From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id OAt8NvVv+2R5YgAAauVa8A:P1 (envelope-from ) for ; Fri, 08 Sep 2023 21:03:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id OAt8NvVv+2R5YgAAauVa8A (envelope-from ) for ; Fri, 08 Sep 2023 21:03:17 +0200 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 3A85041EBA for ; Fri, 8 Sep 2023 21:03:16 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=h0dtmAp6; 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=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1694199797; 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=bhyH8enMhL3tBNMmZhHdndhg+80CMPhOntBu7+gnZL0=; b=ehwMzL8P0QrmqnnaplQ1y8Xa5ZUd9xLT1+2Xbmo6KuY3w7rQoJF5lfX0PTl/1ypm7lj8Mv 4hRoueqkm2wkSx55iKqhmJ/sFYvsLIXN/y6/59pjV7KSoahGb6J9isxZ5arrI7dtQ8/Id0 dk0aVF+ubs/fqn4s0fZn0H+ejdqMrkBFsobUJzEICnUjdspxBlnuNsmTP8l2hwzbt8mIed qdykLzp70ZSm/OWskgaYzBunE86ERgVn+IXXS672ATnDZnYGGgqoyIfeBKGTCyx5+abTWF WNwuNPbwlKgipWBw1p6nX/8gmqdS8vFLYRmSBnzNDWbWbrAzQoIhOLwr+JSXVw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=h0dtmAp6; 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=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1694199797; a=rsa-sha256; cv=none; b=qgOSwniActkoMixi3kUcexm8M+vivuuQBnD+GeGlkdK9yMiwhukwS5Umbqvht9qqo1taaf Q8SOqapzbeG6c1NJIHn8AT3C3vHvbqz17QkVAyeq0qdf8GRNv0TsGPZRbv1TmCy0Io+2vv 5sL6D470VgCJnsSqg36mem1I7ztCZruwM9V42UQdUYZjmqFDk4hTvvCCLTUo7AD6HgrMD/ BTG72iMGaoXuO9308gGfMyHVcAocGQWKFwwcbA8qQ3u3WQv4GFWeiANMirCMNY/2C6yLLR z1GT0D9ZVCwD7CtjqSDn1ak5T+qOAVWUTZlMBxkPRmuQBM2QZcnDs0LEbv6oCA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qegkS-00068d-1x; Fri, 08 Sep 2023 15:02:32 -0400 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 1qegkP-00067y-UC for emacs-orgmode@gnu.org; Fri, 08 Sep 2023 15:02:29 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qegkK-0007km-1T for emacs-orgmode@gnu.org; Fri, 08 Sep 2023 15:02:29 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id D2893240029 for ; Fri, 8 Sep 2023 21:02:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1694199741; bh=zYszgvT10J6Gx65Xn5vd/tq5GvphysLUTk1YJTdJleI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=h0dtmAp68SN+sfn5JIAE9NBMaR/hVczfM7DkAbxwBEC6RtDM+c9/dzt1rSlcAu7SY BEKKoBsACkneNvF85brA2orcsyloJHXAiH/UJy0kL3W7Ul39wCo/qAF1FlPifoAkP3 Ssng1BbAV3HaMY1xy5ZTH5xogFsF9UUTuQWrAHwTmFw7Vv58uz1vSsavc/6LCMR3on khn+2w3HItvv0xqCZ3IEZp9ptXWT+ZlGjeTKKBMH01Zq/jOuI/TlLefzlT5Hb7w3SD mBfQ3jkFp6ALOU0R5WFLGk2b/C50/C/pXljqKjytXwXRx4SU0DtBL7pJ2QmRVm0DdO B/7fWJKSveqVw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Rj58F2CF2z6twQ; Fri, 8 Sep 2023 21:02:21 +0200 (CEST) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: emacs-orgmode@gnu.org Cc: Max Nikulin , Ihor Radchenko Subject: [patch] Fixes and improvements in org-latex-language-alist (was: ox-latex language handling in Org-9.5 vs 9.6) In-Reply-To: <877cp0ybdg.fsf@posteo.net> ("Juan Manuel =?utf-8?Q?Mac=C3=AD?= =?utf-8?Q?as=22's?= message of "Fri, 08 Sep 2023 14:42:51 +0000") References: <87v8cneyfu.fsf@posteo.net> <87edjanqxb.fsf@localhost> <87o7ieukum.fsf@posteo.net> <877cp0ybdg.fsf@posteo.net> Date: Fri, 08 Sep 2023 19:02:19 +0000 Message-ID: <8734zoxzd0.fsf_-_@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.65; envelope-from=maciaschain@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 3A85041EBA X-Migadu-Scanner: mx1.migadu.com X-Migadu-Spam-Score: -4.63 X-Spam-Score: -4.63 X-TUID: fEx9aNtTRsPG --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable I think that with this patch the possible regressions are removed. I took the opportunity to add some improvements (the :babel-ini-alt, :script and :script-tag properties) and correct some errors and typos. I don't know if it's a valid path to allow the car of each element to also be a list of languages codes, but I couldn't think of a better solution for the "de"/"de-de" cases. A similar case is in Chinese Simplified (new language added), where the possible language codes are zh and zh-cn, if I'm not wrong. -- Juan Manuel Mac=C3=ADas https://juanmanuelmacias.com https://lunotipia.juanmanuelmacias.com https://gnutas.juanmanuelmacias.com --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0001-ox-latex.el-Fixes-and-improvements-in-org-latex-lang.patch Content-Transfer-Encoding: quoted-printable >From 52f17bc841241562a52e91159cb1531dbe5684e1 Mon Sep 17 00:00:00 2001 From: Juan Manuel Macias Date: Fri, 8 Sep 2023 19:33:25 +0200 Subject: [PATCH] ox-latex.el: Fixes and improvements in `org-latex-language-alist'. * (org-latex-language-alist): Fix a language code (`de-de') removed when `org-latex-babel-language-alist' and `org-latex-polyglossia-language-alist' were merged. To allow language codes that can have a similar translation in `babel' or `polyglossia' now in each element of `org-latex-language-alist' car can also be a list of language codes. New admitted properties: `:babel-ini-alt', `:script' and `:script-tag'. Add language code for ancient Greek. Fix Afrikaans (was previously removed). New languages: Chinese Simplified and Traditional. Correction of some typos, errors and inaccuracies. * (org-latex-guess-babel-language): Some necessary modifications. * (org-latex-guess-polyglossia-language): Some necessary modifications. --- lisp/ox-latex.el | 208 +++++++++++++++++++++++++++-------------------- 1 file changed, 118 insertions(+), 90 deletions(-) diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index 241ef603a..d6790ea27 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -177,94 +177,102 @@ ;;; Internal Variables =20 (defconst org-latex-language-alist - '(("am" :babel-ini-only "amharic" :polyglossia "amharic" :lang-name "Amh= aric") - ("ar" :babel "arabic" :polyglossia "arabic" :lang-name "Arabic") - ("ast" :babel-ini-only "asturian" :polyglossia "asturian" :lang-name "= Asturian") - ("bg" :babel "bulgarian" :polyglossia "bulgarian" :lang-name "Bulgari= an") - ("bn" :babel-ini-only "bengali" :polyglossia "bengali" :lang-name "Be= ngali") - ("bo" :babel-ini-only "tibetan" :polyglossia "tibetan" :lang-name "Ti= betan") - ("br" :babel "breton" :polyglossia "breton" :lang-name "Breton") - ("ca" :babel "catalan" :polyglossia "catalan" :lang-name "Catalan") - ("cop" :babel-ini-only "coptic" :polyglossia "coptic" :lang-name "Cop= tic") - ("cs" :babel "czech" :polyglossia "czech" :lang-name "Czech") - ("cy" :babel "welsh" :polyglossia "welsh" :lang-name "Welsh") - ("da" :babel "danish" :polyglossia "danish" :lang-name "Danish") - ("de" :babel "ngerman" :polyglossia "german" :polyglossia-variant "ge= rman" :lang-name "German") - ("de-at" :babel "naustrian" :polyglossia "german" :polyglossia-varian= t "austrian" :lang-name "German") - ("dsb" :babel "lsorbian" :polyglossia "sorbian" :polyglossia-variant = "lower" :lang-name "Lower Sorbian") - ("dv" :babel-ini-only "divehi" :polyglossia "divehi" :lang-name "Dive= hi") - ("el" :babel "greek" :polyglossia "greek" :lang-name "Greek") - ("el-polyton" :babel "polutonikogreek" :polyglossia "greek" :polyglos= sia-variant "polytonic" :lang-name "Polytonic Greek") - ("en" :babel "american" :polyglossia "english" :polyglossia-variant "= usmax" :lang-name "English") - ("en-au" :babel "australian" :polyglossia "english" :polyglossia-vari= ant "australian" :lang-name "English") - ("en-gb" :babel "british" :polyglossia "english" :polyglossia-variant= "uk" :lang-name "English") - ("en-nz" :babel "newzealand" :polyglossia "english" :polyglossia-vari= ant "newzealand" :lang-name "English") - ("en-us" :babel "american" :polyglossia "english" :polyglossia-varian= t "usmax" :lang-name "English") - ("eo" :babel "esperanto" :polyglossia "esperanto" :lang-name "Esperan= to") - ("es" :babel "spanish" :polyglossia "spanish" :lang-name "Spanish") - ("es-mx" :babel "spanishmx" :polyglossia "spanish" :polyglossia-varia= nt "mexican" :lang-name "Spanish") - ("et" :babel "estonian" :polyglossia "estonian" :lang-name "Estonian") - ("eu" :babel "basque" :polyglossia "basque" :lang-name "Basque") - ("fa" :babel "farsi" :polyglossia "farsi" :lang-name "Farsi") - ("fi" :babel "finnish" :polyglossia "finnish" :lang-name "Finnish") - ("fr" :babel "french" :polyglossia "french" :lang-name "French") - ("fr-ca" :babel "canadien" :polyglossia "french" :polyglossia-variant= "canadian" :lang-name "French") - ("fur" :babel "friulan" :polyglossia "friulan" :lang-name "Friulian") - ("ga" :babel "irish" :polyglossia "irish" :lang-name "Irish") - ("gd" :babel "scottish" :polyglossia "scottish" :lang-name "Scottish = Gaelic") - ("gl" :babel "galician" :polyglossia "galician" :lang-name "Galician") - ("he" :babel "hebrew" :polyglossia "hebrew" :lang-name "Hebrew") - ("hi" :babel "hindi" :polyglossia "hindi" :lang-name "Hindi") - ("hr" :babel "croatian" :polyglossia "croatian" :lang-name "Croatian") - ("hsb" :babel "uppersorbian" :polyglossia "sorbian" :polyglossia-vari= ant "upper" :lang-name "Upper Sorbian") - ("hu" :babel "magyar" :polyglossia "magyar" :lang-name "Magyar") - ("hy" :babel-ini-only "armenian" :polyglossia "armenian" :lang-name "= Armenian") - ("ia" :babel "interlingua" :polyglossia "interlingua" :lang-name "Int= erlingua") - ("id" :babel-ini-only "bahasai" :polyglossia "bahasai" :lang-name "Ba= hasai") - ("is" :babel "icelandic" :polyglossia "icelandic" :lang-name "Iceland= ic") - ("it" :babel "italian" :polyglossia "italian" :lang-name "Italian") - ("kn" :babel-ini-only "kannada" :polyglossia "kannada" :lang-name "Ka= nnada") - ("la" :babel "latin" :polyglossia "latin" :lang-name "Latin") - ("la-classic" :babel "classiclatin" :polyglossia "latin" :polyglossia= -variant "classic" :lang-name "Classic Latin") - ("la-medieval" :babel "medievallatin" :polyglossia "latin" :polygloss= ia-variant "medieval" :lang-name "Medieval Latin") - ("la-ecclesiastic" :babel "ecclesiasticlatin" :polyglossia "latin" :p= olyglossia-variant "ecclesiastic" :lang-name "Ecclesiastic Latin") - ("lo" :babel-ini-only "lao" :polyglossia "lao" :lang-name "Lao") - ("lt" :babel "lithuanian" :polyglossia "lithuanian" :lang-name "Lithu= anian") - ("lv" :babel "latvian" :polyglossia "latvian" :lang-name "Latvian") - ("ml" :babel-ini-only "malayalam" :polyglossia "malayalam" :lang-name= "Malayalam") - ("mr" :babel-ini-only "maranthi" :polyglossia "maranthi" :lang-name "= Maranthi") - ("nb" :babel "norsk" :polyglossia "norwegian" :polyglossia-variant "b= okmal" :lang-name "Norwegian Bokm=C3=A5l") - ("nl" :babel "dutch" :polyglossia "dutch" :lang-name "Dutch") - ("nn" :babel "nynorsk" :polyglossia "norwegian" :polyglossia-variant = "nynorsk" :lang-name "Norwegian Nynorsk") - ("no" :babel "norsk" :polyglossia "norsk" :lang-name "Norwegian") - ("oc" :babel "occitan" :polyglossia "occitan" :lang-name "Occitan") - ("pl" :babel "polish" :polyglossia "polish" :lang-name "Polish") - ("pms" :babel "piedmontese" :polyglossia "piedmontese" :lang-name "Pi= edmontese") - ("pt" :babel "portuges" :polyglossia "portuges" :lang-name "Portuges") - ("pt-br" :babel "brazilian" :polyglossia "brazilian" :lang-name "Port= uges") - ("rm" :babel-ini-only "romansh" :polyglossia "romansh" :lang-name "Ro= mansh") - ("ro" :babel "romanian" :polyglossia "romanian" :lang-name "Romanian") - ("ru" :babel "russian" :polyglossia "russian" :lang-name "Russian") - ("sa" :babel-ini-only "sanskrit" :polyglossia "sanskrit" :lang-name "= Sanskrit") - ("sk" :babel "slovak" :polyglossia "slovak" :lang-name "Slovak") - ("sl" :babel "slovene" :polyglossia "slovene" :lang-name "Slovene") - ("sq" :babel "albanian" :polyglossia "albanian" :lang-name "Albanian") - ("sr" :babel "serbian" :polyglossia "serbian" :lang-name "Serbian") - ("sv" :babel "swedish" :polyglossia "swedish" :lang-name "Swedish") - ("syr" :babel-ini-only "syriac" :polyglossia "syriac" :lang-name "Syr= iac") - ("ta" :babel-ini-only "tamil" :polyglossia "tamil" :lang-name "Tamil") - ("te" :babel-ini-only "telugu" :polyglossia "telugu" :lang-name "Telu= gu") - ("th" :babel "thai" :polyglossia "thai" :lang-name "Thai") - ("tk" :babel "turkmen" :polyglossia "turkmen" :lang-name "Turkmen") - ("tr" :babel "turkish" :polyglossia "turkish" :lang-name "Turkish") - ("uk" :babel "ukrainian" :polyglossia "ukrainian" :lang-name "Ukraini= an") - ("ur" :babel-ini-only "urdu" :polyglossia "urdu" :lang-name "Urdu") - ("vi" :babel "vietnamese" :polyglossia "vietnamese" :lang-name "Vietn= amese")) + '(("af" :babel "afrikaans" :polyglossia "afrikaans" :lang-name "Afrikaan= s" :script "latin" :script-tag "latn") + ("am" :babel-ini-only "amharic" :polyglossia "amharic" :lang-name "Amh= aric" :script "ethiopic" :script-tag "ethi") + ("ar" :babel-ini-only "arabic" :polyglossia "arabic" :lang-name "Arabi= c" :script "arabic" :script-tag "arab") + ("ast" :babel-ini-only "asturian" :polyglossia "asturian" :lang-name "= Asturian" :script "latin" :script-tag "latn") + ("bg" :babel "bulgarian" :polyglossia "bulgarian" :lang-name "Bulgari= an" :script "cyrillic" :script-tag "cyrl") + ("bn" :babel-ini-only "bengali" :polyglossia "bengali" :lang-name "Be= ngali" :script "bengali" :script-tag: "beng") + ("bo" :babel-ini-only "tibetan" :polyglossia "tibetan" :lang-name "Ti= betan" :script "tibetan" :script-tag "tib") + ("br" :babel "breton" :polyglossia "breton" :lang-name "Breton" :scri= pt "latin" :script-tag "latn") + ("ca" :babel "catalan" :polyglossia "catalan" :lang-name "Catalan" :s= cript "latin" :script-tag "latn") + ("cop" :babel-ini-only "coptic" :polyglossia "coptic" :lang-name "Cop= tic" :script "coptic" :script-tag "copt") + ("cs" :babel "czech" :polyglossia "czech" :lang-name "Czech" :script = "latin" :script-tag "latn") + ("cy" :babel "welsh" :polyglossia "welsh" :lang-name "Welsh" :script = "latin" :script-tag "latn") + ("da" :babel "danish" :polyglossia "danish" :lang-name "Danish" :scri= pt "latin" :script-tag "latn") + (("de" "de-de") :babel "ngerman" :babel-ini-alt "german" :polyglossia= "german" :polyglossia-variant "german" :lang-name "German" :script "latin"= :script-tag "latn") + ("de-at" :babel "naustrian" :babel-ini-alt "german-austria" :polyglos= sia "german" :polyglossia-variant "austrian" :lang-name "German" :script "l= atin" :script-tag "latn") + ("dsb" :babel "lowersorbian" :babel-ini-alt "lsorbian" :polyglossia "= sorbian" :polyglossia-variant "lower" :lang-name "Lower Sorbian" :script "l= atin" :script-tag "latn") + ("dv" :polyglossia "divehi" :lang-name "Dhivehi" :script "latin" :scri= pt-tag "latn") + ("el" :babel "greek" :polyglossia "greek" :lang-name "Greek" :script = "greek" :script-tag "grek") + ("el-polyton" :babel "polutonikogreek" :babel-ini-alt "polytonicgreek= " :polyglossia "greek" :polyglossia-variant "polytonic" :lang-name "Polyton= ic Greek" :script "greek" :script-tag "grek") + ("grc" :babel "greek.ancient" :babel-ini-alt "ancientgreek" :polyglos= sia "greek" :polyglossia-variant "ancient" :lang-name "Ancient Greek" :scri= pt "greek" :script-tag "grek") + ("en" :babel "english" :polyglossia "english" :polyglossia-variant "u= smax" :lang-name "English" :script "latin" :script-tag "latn") + ("en-au" :babel "australian" :polyglossia "english" :polyglossia-vari= ant "australian" :lang-name "English" :script "latin" :script-tag "latn") + ("en-ca" :babel "canadian" :polyglossia "english" :polyglossia-varian= t "canadian" :lang-name "English" :script "latin" :script-tag "latn") + ("en-gb" :babel "british" :polyglossia "english" :polyglossia-variant= "uk" :lang-name "English" :script "latin" :script-tag "latn") + ("en-nz" :babel "newzealand" :polyglossia "english" :polyglossia-vari= ant "newzealand" :lang-name "English" :script "latin" :script-tag "latn") + ("en-us" :babel "american" :polyglossia "english" :polyglossia-varian= t "usmax" :lang-name "English" :script "latin" :script-tag "latn") + ("eo" :babel "esperanto" :polyglossia "esperanto" :lang-name "Esperan= to" :script "latin" :script-tag "latn") + ("es" :babel "spanish" :polyglossia "spanish" :lang-name "Spanish" :s= cript "latin" :script-tag "latn") + ("es-mx" :babel "spanishmx" :polyglossia "spanish" :polyglossia-varia= nt "mexican" :lang-name "Spanish" :script "latin" :script-tag "latn") + ("et" :babel "estonian" :polyglossia "estonian" :lang-name "Estonian"= :script "latin" :script-tag "latn") + ("eu" :babel "basque" :polyglossia "basque" :lang-name "Basque" :scri= pt "latin" :script-tag "latn") + ("fa" :babel "persian" :polyglossia "persian" :lang-name "Persian" :s= cript "arabic" :script-tag "arab") + ("fi" :babel "finnish" :polyglossia "finnish" :lang-name "Finnish" :s= cript "latin" :script-tag "latn") + ("fr" :babel "french" :polyglossia "french" :lang-name "French" :scri= pt "latin" :script-tag "latn") + ("fr-ca" :babel "canadien" :babel-ini-alt "canadian" :polyglossia "fr= ench" :polyglossia-variant "canadian" :lang-name "French" :script "latin" := script-tag "latn") + ("fur" :babel "friulian" :polyglossia "friulian" :lang-name "Friulian= " :script "latin" :script-tag "latn") + ("ga" :babel "irish" :polyglossia "gaelic" :polyglossia-variant "iris= h" :lang-name "Irish Gaelic" :script "latin" :script-tag "latn") + ("gd" :babel "scottish" :polyglossia "gaelic" :polyglossia-variant "s= cottish" :lang-name "Scottish Gaelic" :script "latin" :script-tag "latn") + ("gl" :babel "galician" :polyglossia "galician" :lang-name "Galician"= :script "latin" :script-tag "latn") + ("he" :babel "hebrew" :polyglossia "hebrew" :lang-name "Hebrew" :scri= pt "hebrew" :script-tag "hebr") + ("hi" :babel "hindi" :polyglossia "hindi" :lang-name "Hindi" :script = "devanagari" :script-tag "deva") + ("hr" :babel "croatian" :polyglossia "croatian" :lang-name "Croatian"= :script "latin" :script-tag "latn") + ("hsb" :babel "uppersorbian" :polyglossia "sorbian" :polyglossia-vari= ant "upper" :lang-name "Upper Sorbian" :script "latin" :script-tag "latn") + ("hu" :babel "magyar" :polyglossia "magyar" :lang-name "Magyar" :scri= pt "latin" :script-tag "latn") + ("hy" :babel-ini-only "armenian" :polyglossia "armenian" :lang-name "= Armenian" :script "armenian" :script-tag "armn") + ("ia" :babel "interlingua" :polyglossia "interlingua" :lang-name "Int= erlingua" :script "latin" :script-tag "latn") + ("id" :babel "indonesian" :polyglossia "malay" :polyglossia-variant "= indonesian" :lang-name "Indonesian" :script "latin" :script-tag "latn") + ("is" :babel "icelandic" :polyglossia "icelandic" :lang-name "Iceland= ic" :script "latin" :script-tag "latn") + ("it" :babel "italian" :polyglossia "italian" :lang-name "Italian" :s= cript "latin" :script-tag "latn") + ("kn" :babel-ini-only "kannada" :polyglossia "kannada" :lang-name "Ka= nnada" :script "kannada" :script-tag "knda") + ("la" :babel "latin" :polyglossia "latin" :lang-name "Latin" :script = "latin" :script-tag "latn") + ("la-classic" :babel "classiclatin" :polyglossia "latin" :polyglossia= -variant "classic" :lang-name "Classic Latin" :script "latin" :script-tag "= latn") + ("la-medieval" :babel "medievallatin" :polyglossia "latin" :polygloss= ia-variant "medieval" :lang-name "Medieval Latin" :script "latin" :script-t= ag "latn") + ("la-ecclesiastic" :babel "ecclesiasticlatin" :polyglossia "latin" :p= olyglossia-variant "ecclesiastic" :lang-name "Ecclesiastic Latin" :script "= latin" :script-tag "latn") + ("lo" :babel-ini-only "lao" :polyglossia "lao" :lang-name "Lao" :scri= pt "lao" :script-tag "lao") + ("lt" :babel "lithuanian" :polyglossia "lithuanian" :lang-name "Lithu= anian" :script "latin" :script-tag "latn") + ("lv" :babel "latvian" :polyglossia "latvian" :lang-name "Latvian" :s= cript "latin" :script-tag "latn") + ("ml" :babel-ini-only "malayalam" :polyglossia "malayalam" :lang-name= "Malayalam" :script "malayalam" :script-tag "mlym") + ("mr" :babel-ini-only "marathi" :polyglossia "marathi" :lang-name "Ma= rathi" :script "devanagari" :script-tag "deva") + ("ms" :babel "malay" :polyglossia "malay" :polyglossia-variant "malay= sian" :lang-name "Malay" :script "latin" :script-tag "latn") + ("nb" :babel "norsk" :polyglossia "norwegian" :polyglossia-variant "b= okmal" :lang-name "Norwegian Bokm=C3=A5l" :script "latin" :script-tag "latn= ") + ("nl" :babel "dutch" :polyglossia "dutch" :lang-name "Dutch" :script = "latin" :script-tag "latn") + ("nn" :babel "nynorsk" :polyglossia "norwegian" :polyglossia-variant = "nynorsk" :lang-name "Norwegian Nynorsk" :script "latin" :script-tag "latn") + ("no" :babel "norsk" :polyglossia "norsk" :lang-name "Norwegian" :scr= ipt "latin" :script-tag "latn") + ("oc" :babel "occitan" :polyglossia "occitan" :lang-name "Occitan" :s= cript "latin" :script-tag "latn") + ("pl" :babel "polish" :polyglossia "polish" :lang-name "Polish" :scri= pt "latin" :script-tag "latn") + ("pms" :babel "piedmontese" :polyglossia "piedmontese" :lang-name "Pie= dmontese" :script "latin" :script-tag "latn") + ("pt" :babel "portuges" :polyglossia "portuges" :lang-name "Portuges"= :script "latin" :script-tag "latn") + ("pt-br" :babel "brazilian" :polyglossia "brazilian" :lang-name "Portu= ges" :script "latin" :script-tag "latn") + ("rm" :babel-ini-only "romansh" :polyglossia "romansh" :lang-name "Ro= mansh" :script "latin" :script-tag "latn") + ("ro" :babel "romanian" :polyglossia "romanian" :lang-name "Romanian"= :script "latin" :script-tag "latn") + ("ru" :babel "russian" :polyglossia "russian" :lang-name "Russian" :s= cript "cyrillic" :script-tag "cyrl") + ("sa" :babel-ini-only "sanskrit" :polyglossia "sanskrit" :lang-name "= Sanskrit" :script "devanagari" :script-tag "deva") + ("sk" :babel "slovak" :polyglossia "slovak" :lang-name "Slovak" :scri= pt "latin" :script-tag "latn") + ("sl" :babel "slovene" :polyglossia "slovene" :lang-name "Slovene" :s= cript "latin" :script-tag "latn") + ("sq" :babel "albanian" :polyglossia "albanian" :lang-name "Albanian"= :script "latin" :script-tag "latn") + ("sr" :babel "serbian" :polyglossia "serbian" :lang-name "Serbian" :s= cript "latin" :script-tag "latn") + ("sr-cyrl" :babel-ini-only "serbian-cyrl" :polyglossia "serbian" :lang= -name "Serbian" :script "cyrillic" :script-tag "cyrl") + ("sr-latn" :babel-ini-only "serbian-latin" :polyglossia "serbian" :lan= g-name "Serbian" :script "latin" :script-tag "latn") + ("sv" :babel "swedish" :polyglossia "swedish" :lang-name "Swedish" :s= cript "latin" :script-tag "latn") + ("syr" :babel-ini-only "syriac" :polyglossia "syriac" :lang-name "Syri= ac" :script "syriac" :script-tag "syrc") + ("ta" :babel-ini-only "tamil" :polyglossia "tamil" :lang-name "Tamil"= :script "tamil" :script-tag "taml") + ("te" :babel-ini-only "telugu" :polyglossia "telugu" :lang-name "Telu= gu" :script "telugu" :script-tag "telu") + ("th" :babel "thai" :polyglossia "thai" :lang-name "Thai" :script "th= ai" :script-tag "thai") + ("tk" :babel "turkmen" :polyglossia "turkmen" :lang-name "Turkmen" :s= cript "latin" :script-tag "latn") + ("tr" :babel "turkish" :polyglossia "turkish" :lang-name "Turkish" :s= cript "latin" :script-tag "latn") + ("uk" :babel "ukrainian" :polyglossia "ukrainian" :lang-name "Ukraini= an" :script "cyrillic" :script-tag "cyrl") + ("ur" :babel-ini-only "urdu" :polyglossia "urdu" :lang-name "Urdu" :s= cript "arabic" :script-tag "arab") + ("vi" :babel "vietnamese" :polyglossia "vietnamese" :lang-name "Vietn= amese" :script "latin" :script-tag "latn") + (("zh" "zh-cn") :babel-ini-only "chinese" :polyglossia "chinese" :lan= g-name "Chinese Simplified" :script "hans" :script-tag "hans") + ("zh-tw" :babel-ini-only "chinese-traditional" :polyglossia "chinese"= :polyglossia-variant "traditional" :lang-name "Chinese Traditional" :scrip= t "hant" :script-tag "hant")) "Alist between language code and its properties for LaTeX export. =20 -In each element of the list car is always the code of the -language and cdr is a property list. Valid keywords for this -list can be: +In each element of the list car is always the language code or a +list of languages codes and cdr is a property list. Valid +keywords for this list can be: =20 - `:babel' the name of the language loaded by the Babel LaTeX package =20 @@ -275,9 +283,17 @@ list can be: exclusively through the new ini files method. See `http://mirrors.ctan.org/macros/latex/required/babel/base/babel.pdf' =20 +- `:babel-ini-alt' an alternative language name when it is loaded + using ini files + - `:polyglossia-variant' the language variant loaded by Polyglossia =20 -- `:lang-name' the actual name of the language.") +- `:lang-name' the actual name of the language + +- `:script' the script name + +- `:script-tag' the script otf tag.") + =20 (defconst org-latex-line-break-safe "\\\\[0pt]" "Linebreak protecting the following [...]. @@ -1657,9 +1673,15 @@ already loaded. Return the new header." (let* ((language-code (plist-get info :language)) (plist (cdr - (assoc language-code org-latex-language-alist))) + (cl-assoc-if (lambda (x) + (or (and (stringp x) + (string=3D language-code x)) + (and (listp x) + (member language-code x)))) + org-latex-language-alist))) (language (plist-get plist :babel)) (language-ini-only (plist-get plist :babel-ini-only)) + (language-ini-alt (plist-get plist :babel-ini-alt)) ;; If no language is set, or Babel package is not loaded, or ;; LANGUAGE keyword value is a language served by Babel ;; exclusively through ini files, return HEADER as-is. @@ -1691,7 +1713,8 @@ Return the new header." (replace-regexp-in-string (format "\\(\\\\babelprovide\\[.*\\]\\)\\({\\)%s}" prov) (format "\\1\\2%s}" - (or language language-ini-only)) + (if language-ini-alt language-ini-alt + (or language language-ini-= only))) header t) header))))) =20 @@ -1736,7 +1759,12 @@ Return the new header." (mapconcat (lambda (l) (let* ((plist (cdr - (assoc language org-latex-language-alist))) + (cl-assoc-if (lambda (x) + (or (and (stringp x) + (string=3D lang= uage x)) + (and (listp x) + (member languag= e x)))) + org-latex-language-alist))) (polyglossia-variant (plist-get plist :polyglossia-variant)) (polyglossia-lang (plist-get plist :polyglossia)) (l (if (equal l language) --=20 2.42.0 --=-=-=--