From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id UPIlK/QJj2DzAgAAgWs5BA (envelope-from ) for ; Sun, 02 May 2021 22:22:12 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id JJQ3JvQJj2CPXAAAB5/wlQ (envelope-from ) for ; Sun, 02 May 2021 20:22:12 +0000 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 2FBB9A6D1 for ; Sun, 2 May 2021 22:22:12 +0200 (CEST) Received: from localhost ([::1]:50572 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldIbT-0001Ss-Ae for larch@yhetil.org; Sun, 02 May 2021 16:22:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41118) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldIaK-0001SB-Lw for emacs-orgmode@gnu.org; Sun, 02 May 2021 16:21:02 -0400 Received: from mout01.posteo.de ([185.67.36.65]:36201) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldIaF-0001BW-0c for emacs-orgmode@gnu.org; Sun, 02 May 2021 16:21:00 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 085B3240026 for ; Sun, 2 May 2021 22:20:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1619986852; bh=hlm6yYpmIRDVERW8LLiOVqTFRUZ56yoT62KbiiJM1Uk=; h=From:To:Subject:Date:From; b=Y5F4k3IBdATuzT0M1dx3tznEobdVVp4MJcHHbB2OFY7rmql28uhSACfOEIKl8Xjiz wXp1rzEuVw9Vj/zLKjJpJwbz6sAOEkugsoykVlztEzZsMn6RT06clRVZTiERF2XjEs kF84pIZR2HGb5ZoexO+7qUdIQMtJbkjSV+8wupO/4YInXn8UBKVZ5HkM4LmgQtgqPL 5+dbK+9hR1DU/x0nXkSQF7sVoPxJ99faezAMS/2y9ZAheYO74dWllEM4sntXk7c/gG +A6XMyizmII85PNnlPP7sPKLye77+wKZYfZcyd2/IZ/Q3XHJMx3+UXAXN6eemChfL3 /p03nGBcXf7rA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4FYHYH23skz6tmH for ; Sun, 2 May 2021 22:20:51 +0200 (CEST) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: orgmode Subject: About multilingual documents Date: Sun, 02 May 2021 20:20:49 +0000 Message-ID: <871raosx9a.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_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, 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.23 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" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1619986932; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=uK2slUgAR5xukjAvQaD6AIu4pzJETOde/fllRonDdR8=; b=VUWS8zgm4QJ5NFOj9L7Go4P5bEIoXZibn6ngksACwE3s4Lzx1TuGNxqzaBIdx0CYSskhag 6gCbe4AGkq0P7GqhmJMOdHqIOgyJe+x3bbtdwouA0m68M1Fcq5F028gRajlb4/wkqUNvin GzgyD2olm8BlzgI/9Hnb471dJKZUprC48nqthF6ebLNbcHtVS7eTBy8JBnKcbaT2RsonQE JHJEBFW3UQAVlDzkkZy5YoiyCXlytRLo10Zry7KlbMXzuazvj2WOVrypfJqQcxZAF4NeGR 6lTAq8ENHTKzkDKUQ03yc1NKGqH9387iWupOPsvoYGz9AbfO8oFIfQTZqdTBEA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1619986932; a=rsa-sha256; cv=none; b=ISpwcYPiVaXng2TDEZ4tchKhT6dTyQgm4E69jCO0xE5buW80AlIqEufYLK3mY1hM+pmBCi UArY844pfonHZvwx8e+CWmL7FXwzX0VnkI3aYuY4SB+DF8Aee0G6A4DERCOsvxu2l0TU2f I/oK7T0o7YO7HexhlaGHk58yR07PZZkz2DcHGBoUMCOKo2MMlIaNaAKEZuimrIxUkYocHg +ilkquDkjzoN0n6ilWQiFNc3GRy4IZ9w5rNHyPZ2zmQegjl2nHCn5HSXpJdesU15lpOr/6 Nn8FGW01lgLkSKLKCGqlI3PruogGDsFKx5gDuMoXrzjv0EALLGfOcyFFpp+zZA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Y5F4k3IB; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -3.16 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Y5F4k3IB; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 2FBB9A6D1 X-Spam-Score: -3.16 X-Migadu-Scanner: scn0.migadu.com X-TUID: v4bxNYMwUfRK --=-=-= Content-Type: text/plain Hi all, I'm curious to see how other Org users deal with multilingual documents, that is, those documents (for example, philology or linguistics texts) that contain a significant number of online quotes in other languages. Naturally, this makes more sense in the LaTeX backend, since it is convenient to enclose these quotes in a \foreignlanguage command to ensure that LaTeX at least apply the correct hyphenation patterns for words in other languages. Luckily, in the latest versions of Babel (the Babel of LaTeX) you don't need to do this when it comes to languages whose script is different from Latin (e.g. Greek, languages with Cyrillic, Arabic, Hindi, etc.). We can, for example, define Russian and Greek as: #+begin_src latex \babelprovide[onchar=ids fonts,hyphenrules=russian]{russian} \babelprovide[onchar=ids fonts,hyphenrules=ancientgreek]{greek} #+end_src And also the fonts for both languages: #+begin_src latex \babelfont[russian]{rm}{Linux Libertine O} \babelfont[greek]{rm}]{Free Serif} #+end_src For Latin-based scripts it is still necessary enclose the text in the \foreignlanguage command. And now comes the question: how do Org users who work in multilingual documents to obtain this command when exporting to Latex? I usually use macros, which always tend to work fine. But lately I have been testing an alternative markup system using an export filter. The idea would be something like: %(lang) lorem ipsum dolor %() I start from a list of the most used languages: #+begin_src emacs-lisp (langs '(("en" "english") ("fr" "french") ("de" "german") ("it" "italian") ("pt" "portuguese"))) #+end_src And other possible languages that Babel supports can be indicated explicitly, by prepending "--": %(fr) ... %() %(--esperanto) ... %() (If someone wants to try it, I attach a small Org document). Best regards, Juan Manuel --=-=-= Content-Type: application/vnd.lotus-organizer Content-Disposition: attachment; filename=test-langs.org Content-Transfer-Encoding: base64 IytUSVRMRTogTGlnaHQgbWFya3VwIGZvciBiYWJlbCAoTGFUZVgpIGNvbW1hbmRzCgoqIFRlc3QK CiUoZGUpIEdvbGRuZXIgU2NobGFmLCBudXIgZGVzc2VuIEhlcnogenVmcmllZGVuICUoKQoKJShm cikgcmVsYXRpb24sIGRlIG5hdHVyZSBpbmTDqXRlcm1pbsOpZSwgZW50cmUgY2VzIGRldXggdGV4 dGVzICUoKQoKJSgtLWVzcGVyYW50bykgTmUgdmVuYXMgbW9udCcgYWwgbW9udG8sIHNlZCBob21v IGhvbW9uIHJlbmtvbnRhcy4gJSgpCgolKC0tbGF0aW4pIEluIHVpdGl1bSBkdWNpdCBjdWxwYWUg ZnVnYSwgc2kgY2FyZXQgYXJ0ZS4gJSgpCgpFc2NhcGVkIHZlcnNpb25zCgo7JShkZSkgR29sZG5l ciBTY2hsYWYsIG51ciBkZXNzZW4gSGVyeiB6dWZyaWVkZW4gJSgpCgo7JShmcikgcmVsYXRpb24s IGRlIG5hdHVyZSBpbmTDqXRlcm1pbsOpZSwgZW50cmUgY2VzIGRldXggdGV4dGVzICUoKQoKOyUo LS1lc3BlcmFudG8pIE5lIHZlbmFzIG1vbnQnIGFsIG1vbnRvLCBzZWQgaG9tbyBob21vbiByZW5r b250YXMuICUoKQoKOyUoLS1sYXRpbikgSW4gdWl0aXVtIGR1Y2l0IGN1bHBhZSBmdWdhLCBzaSBj YXJldCBhcnRlLiAlKCkKCiogQ29kZQoKIytCSU5EOiBvcmctZXhwb3J0LWZpbHRlci1maW5hbC1v dXRwdXQtZnVuY3Rpb25zIChteS1sYXRleC1iYWJlbC1maWx0ZXIpCgojK2JlZ2luX3NyYyBlbWFj cy1saXNwIDpleHBvcnRzIHJlc3VsdHMgOnJlc3VsdHMgbm9uZQogIChkZWZ1biBteS1sYXRleC1i YWJlbC1maWx0ZXIgKHRleHQgYmFja2Vu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