From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 6NkhOhNFuWPFrAAAbAwnHQ (envelope-from ) for ; Sat, 07 Jan 2023 11:10:28 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id cJJLORNFuWPF7QAAG6o9tA (envelope-from ) for ; Sat, 07 Jan 2023 11:10:27 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 770EB2E662 for ; Sat, 7 Jan 2023 11:10:27 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pE69G-0002u0-Ia; Sat, 07 Jan 2023 05:09:58 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pE69E-0002tm-I4 for emacs-orgmode@gnu.org; Sat, 07 Jan 2023 05:09:56 -0500 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pE69C-0004IW-Fr for emacs-orgmode@gnu.org; Sat, 07 Jan 2023 05:09:56 -0500 Received: by mail-pj1-x1029.google.com with SMTP id o7-20020a17090a0a0700b00226c9b82c3aso4319185pjo.3 for ; Sat, 07 Jan 2023 02:09:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=FNQcASEb4ue/BRYSi92knP3J2lbQ0H7bD9LWuyBDUOM=; b=YourKjVqYMtiZq/Lc3gsHoeRuhDF+TWF6tglcVhdg544qqIAY9Bwg5QpC3ryMlKalx zpYdWmh6cS+B68RtU+JFEYjlW6+g/w8WyyVrAZs5QrqX3SeBot3zz+7whKI1rJJWMHR+ BahALMBlzReMp7VtTg7B0GmaWpLOph3sIl0KqwqJgM9wWP5jyAB49wzoQwTOFHxUYhAc Rv0HAav0z62/r+mtM8mAkTZSQPJmYu4Xr22+meQMT67dmncVOLh81FUq9F8ZZmyd0P1c wRy4qgLePa7CVDqqBhyQKXdSfN/SgUHbRy1uCwutkHexOjjwxQ+Rj2HRUHsajIxNHDai 8Zug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=FNQcASEb4ue/BRYSi92knP3J2lbQ0H7bD9LWuyBDUOM=; b=fgdB8qFvZw1s4NGRe7+7VPRxfGDDjZjd5p03LAfxvA7z2ag1iF86Uwwp4q3zQrRS83 3H1xs3X+9vBXAEtvFCykU0XZIYOv+S5gDQ3DqOL/PEJkgGDOOY5IL1eDrCXpMBq4BoOZ k4umEfUGEdfs82gkjI84vB17Tk4Zi+hf8H7j7PCgd6/2rw3/vVFUMdNmBpSxBvFiIrG7 Vj26SQnBTSmmq1XarTUUSRA1k2KJQ8bkSioUPJENIMiz5VZJVhNSTl69JCDzQBgfn4pu fTfbnWTsZO/yB8JdodS5f0V1fdFpRAHFlB5bOA70oqg0uBUT9PdMsT1WSwh0HS5i9ASc hW+A== X-Gm-Message-State: AFqh2kr3UiYElhkQe66TSnLgWOGAWhB5GHUzqgcgw6alVrlPQlwmhtKA oYlowaW0Nn43fY/+uQ3+626LshMAVy+3A2fUhAw= X-Google-Smtp-Source: AMrXdXt57qHDodHGc0EmLDTyeAie9PXYqxiCMKKI6A1MTihGPom24WnqnzbmySaZQNhHvPdsX/3dTKODxhcKwXuWm0w= X-Received: by 2002:a17:902:b68a:b0:192:fad7:4ffc with SMTP id c10-20020a170902b68a00b00192fad74ffcmr677073pls.112.1673086191728; Sat, 07 Jan 2023 02:09:51 -0800 (PST) MIME-Version: 1.0 References: <87358mx1hw.fsf@gmail.com> In-Reply-To: <87358mx1hw.fsf@gmail.com> From: Vikas Rawal Date: Sat, 7 Jan 2023 15:39:39 +0530 Message-ID: Subject: Re: LaTeX export for Org Mode Documents written in Indic Languages To: Krishna Jani Cc: emacs-orgmode@gnu.org Content-Type: multipart/alternative; boundary="00000000000022fccc05f1a9bce4" Received-SPF: pass client-ip=2607:f8b0:4864:20::1029; envelope-from=vikasrawal@gmail.com; helo=mail-pj1-x1029.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1673086227; a=rsa-sha256; cv=none; b=hVkGdwiwVakJRKjDfzFJICwPJhvhXaYThxolKMJl2H4smm51pdW+zz2yXpibBFJ2SU7A8V GgvlJ3DJNjYIq8G5ZoP28OIG7ZbPA1zhTd/7elNfLoTM9AvUCskirb/GhK6dNkR8mB+E22 lC4WsuAAavnG9W6uWo2VPSn1Agr3YzqGf/XdM0fplsRxsHpXVyMdZe69GoTHDvu0OBwEoN WVoDo18PEyNPRK1VKYef7GsuV5IpOF4qJ3eChBC8vnbgMuwhgSFxcZTVYgA4HZYHg2RBAr NgzyUG5lt0Kh4AnOxej6ShlkqVMgjvV5BuWqC7I7LRcM2NN/1geQMuwR2NDufw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=YourKjVq; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1673086227; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=FNQcASEb4ue/BRYSi92knP3J2lbQ0H7bD9LWuyBDUOM=; b=Qw6kARFjHQxhG/Twohapvb5GvboGZipufsr66hGhmcrv6+7gwQR+m3FMUvIMg2x4qK/kW3 V1PX+oRb56p3la6yp1UNICH8FzB3Ie228Tnmh5uqoSGN80ScSzqL7SVnL6/kOStzX/6YtA bCo5TXumd+pC5eEknSk8IilvJA7Bq3E0buOhgQqyOfR+otEApyKLXFdKl+XYyt9Vtfg+sp nRvh2py6SPhX62g3yHvbCGUHAOXfRrNa8eq1a2/U6SyiN3ik0+Rt7kqcwXK/87koqgFSG4 iRWoiKJhthwj+N5rwcBn/R72tYSSN74q2st9i1QaL/UMLU6DMbYXUEOnuh8w/g== X-Spam-Score: -6.18 X-Migadu-Queue-Id: 770EB2E662 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=YourKjVq; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -6.18 X-TUID: /hIMQg+ajy0m --00000000000022fccc05f1a9bce4 Content-Type: text/plain; charset="UTF-8" > > > 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.") --00000000000022fccc05f1a9bce4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

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 2= 012) describing steps for writing and exporting devanagari which is still a= vailable at:=C2=A0https://web.archive.org/web/2013120= 1063324/http://agrarianresearch.org/blog/?p=3D563
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 devanag= ari:

#+LATEX_HEADER: \usepackage{fontspec,xltxtra}=
#+LATEX_HEADER: \usepackage{polyglossia}
#+LATEX_HEADER: \usepackage= [Latin,Devanagari]{ucharclasses}
#+LATEX_HEADER: \setmainfont[Ligatures= =3DTeX,Scale=3D1.0454]{Minion Pro}
#+LATEX_HEADER: \newfontfamily{\defau= ltfont}[Ligatures=3DTeX,Scale=3D1.0454]{Minion Pro}
#+LATEX_HEADER: \new= fontfamily{\devanagarifont}[Scale=3D0.9]{Lohit Devanagari}
#+LATEX_HEADE= R: \setdefaultlanguage{english}
#+LATEX_HEADER: \setotherlanguage{devana= gari}
#+LATEX_HEADER: \setDefaultTransitions{\defaultfont}{}
#+LATEX_= HEADER: \setTransitionTo{devanagari}{\devanagarifont}
#+LATEX_HEADER: \s= etTransitionFrom{devanagari}{\defaultfont}
#+LATEX_HEADER: \setTransitio= nsForLatin{\defaultfont}{}
#+LATEX_HEADER: \setTransitionTo{Devanagari}{= \devanagarifont}
#+LATEX_HEADER: \setTransitionsForDevanagari{\devanagar= ifont}{}

Note that I used Minion Pro for Engli= sh and Lohit Devanagari for Hindi. You may have to check what fonts are ins= talled on your system, and modify these accordingly.

And I have this in my emacs config, which allows me to use arabic number= s 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/30c09955f64815201ae9b86215fed8ea2af0b= a66/lisp/language/ind-util.el#L464
(defun indian-make-hash-without-d= igits (table trans-table)
=C2=A0 "Indian Transliteration Hash for d= ecode/encode"
=C2=A0 (let* ((encode-hash (make-hash-table :test = 9;equal))
=C2=A0 =C2=A0 =C2=A0(decode-hash (make-hash-table :test 'e= qual))
=C2=A0 =C2=A0 =C2=A0(hashtbls (cons encode-hash decode-hash))
= =C2=A0 =C2=A0 =C2=A0(vowels =C2=A0 =C2=A0 (elt table 0))
=C2=A0 =C2=A0 = =C2=A0(consonants (elt table 1))
=C2=A0 =C2=A0 =C2=A0(misc =C2=A0 =C2=A0= =C2=A0 (elt table 2))
=C2=A0 =C2=A0 =C2=A0(digits =C2=A0 =C2=A0 (elt ta= ble 3))
=C2=A0 =C2=A0 =C2=A0(halant =C2=A0 =C2=A0 (char-to-string (elt m= isc =C2=A04)))
=C2=A0 =C2=A0 =C2=A0(trans-vowels =C2=A0 =C2=A0 (elt tran= s-table 0))
=C2=A0 =C2=A0 =C2=A0(trans-consonants (elt trans-table 1))=C2=A0 =C2=A0 =C2=A0(trans-misc =C2=A0 =C2=A0 =C2=A0 (elt trans-table 2))=
=C2=A0 =C2=A0 =C2=A0(trans-digits =C2=A0'("0" "1&quo= t; "2" "3" "4" "5" "6" &q= uot;7" "8" "9")))
=C2=A0 =C2=A0 (indian--puthas= h-v vowels trans-vowels hashtbls)
=C2=A0 =C2=A0 (indian--puthash-c conso= nants trans-consonants halant hashtbls)
=C2=A0 =C2=A0 (indian--puthash-c= v consonants trans-consonants
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 vowels trans-vowels hashtbls)
=C2=A0 =C2=A0 (indian= --puthash-m misc trans-misc hashtbls)
;; =C2=A0 =C2=A0(indian--puthash-m= digits trans-digits hashtbls)
=C2=A0 =C2=A0 hashtbls))


;; ba= sed on:
;; https://g= ithub.com/emacs-mirror/emacs/blob/30c09955f64815201ae9b86215fed8ea2af0ba66/= lisp/language/ind-util.el#L486
(setq indian-dev-itrans-v5-hash-witho= ut-digits
=C2=A0 (indian-make-hash-without-digits indian-dev-base-table<= br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 indian-itrans-v5-table))
;; needed for the quail-define-indian-trans-package function:
;;(add-t= o-list 'load-path "~/emacs/lisp/leim/")
(load "leim/q= uail/indian.elc")
;; (load "quail/indian.el.gz")

<= br>;; based on:
;; ht= tps://github.com/emacs-mirror/emacs/blob/30c09955f64815201ae9b86215fed8ea2a= f0ba66/lisp/leim/quail/indian.el#L56
(quail-define-indian-trans-pack= age
=C2=A0indian-dev-itrans-v5-hash-without-digits "devanagari-itra= ns-without-digits" "Devanagari" "DevIT"
=C2=A0&= quot;Devanagari transliteration by ITRANS method, with Arabic numerals.&quo= t;)

--00000000000022fccc05f1a9bce4--