From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 6M1lL2NekGCs1AAAgWs5BA (envelope-from ) for ; Mon, 03 May 2021 22:34:43 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id eBsFK2NekGBjOgAAB5/wlQ (envelope-from ) for ; Mon, 03 May 2021 20:34:43 +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 294FA24103 for ; Mon, 3 May 2021 22:34:43 +0200 (CEST) Received: from localhost ([::1]:35598 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldfH4-0008Nl-Pn for larch@yhetil.org; Mon, 03 May 2021 16:34:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60148) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldfFd-0007Cp-KV for emacs-orgmode@gnu.org; Mon, 03 May 2021 16:33:09 -0400 Received: from mout02.posteo.de ([185.67.36.66]:42399) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldfFa-0001Jo-4c for emacs-orgmode@gnu.org; Mon, 03 May 2021 16:33:09 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id BC5042400E5 for ; Mon, 3 May 2021 22:33:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1620073982; bh=lMuI5MDbXCulb0YqA2Uuskb/kq62TazsCbB7Hpp6/tM=; h=From:To:Cc:Subject:Date:From; b=a5wBKJYPDN+x7Rptm+emBo0rsAky7Sw4Y9Rmu/2RCuoshqKnMcDrANo3WcKnUrcUR KlDTjQ6ydubv4ZtfsBzv/g6xPa+dX3HRsPf51/HwXZK9y+3EHijUd+WuuZdsi2/FJ6 jH0IROCy3VuQoksYGByR993kQj64WNktfLUKG5pFjp8gEsaF6faN6gjtlpBXjDAekx IXtMF9TdRibX2ZZx4f4qkgAR0akA0MP71Y53+QP8Aw4feWzWSynL9z9+tImXl9FtUS 0iJZhxLxys3ZHQGc03xtZhVkFyvLmrEaBcWRco8bDhzYSaKkThliiCSVwdDRrot4aR gzkwSMJeRCZAA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4FYvmt0Qnbz6tmG; Mon, 3 May 2021 22:33:01 +0200 (CEST) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: Aleksandar Dimitrov Subject: Re: About multilingual documents References: <871raosx9a.fsf@posteo.net> <87k0og8fss.fsf@list.aleks.bg> Date: Mon, 03 May 2021 20:33:01 +0000 In-Reply-To: <87k0og8fss.fsf@list.aleks.bg> (Aleksandar Dimitrov's message of "Mon, 03 May 2021 08:58:11 +0200") Message-ID: <874kfjtv5u.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.66; envelope-from=maciaschain@posteo.net; helo=mout02.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_H4=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.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: orgmode 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=1620074083; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=Hxb20UrtBc1YG+7ah2RM08l6pEI9dwB7WX2rciPa2Ys=; b=XP+eDG69x2ShemggrvQnuzeJmdGw6NgyjwWDQnb6jp9gf/4XkgZpz8ZRpP2250ICpiBqly beICBzHApP3ag28K81l8bfpNzmJ32cuPNj+ast2mU/0Xb+P+lqhE9dXxrcW67Zpj6YWntA M6AqN6BKtyJ1BCf/hfA0P1NNktrSdOyHP/PY6DaIFICCsmBUjReJlmG7qoDT5ggKUCu3Y8 9ANw0tKL8DYs4zALrWu3/A2+YJY52K5qQxAM0EysasECjPlRJo5DRLBBidD91+Dni57+/D gpSi+nh10NcEGFEzngWUXdSG0LuOskcOAWUyJsGcSUP0Y2N5iTuHCkq5D1yLwg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1620074083; a=rsa-sha256; cv=none; b=suKnX3uBkCpJirubxV1BNtSnesGIP0F0x4kohI+eHQo0LNW3Xq4biLLR+M/BoYJGdqpYM1 1ykIQ5l55NuVzhQXRlKIyU5vNH4wINt8HDlfGW/cVWUcMv+9ECgUp1svhzKSurwPPvAZ5o ePgu/G8K+e3URznNV2bTmLwBqAP4K2QYdKEmHIFVrLj+TQZbaIkajtD/TT4vT+nnZcrPaY FAvYNqQoZ1nM0+HW5OTThzD1/9sTCjZRFYFoyYkYAHfP+47v7TBZlFKwFseh4Eoc/wOjtI evuqDEWLmJtRATexqkxjGBGK/1N+bj2JSCLDmY85mJvyYMcdbcYMSjcnZbpmjQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=a5wBKJYP; 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=a5wBKJYP; 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: 294FA24103 X-Spam-Score: -3.16 X-Migadu-Scanner: scn0.migadu.com X-TUID: vaeJpPeeb/Zr Hi Aleksandar, Thank you very much for your interesting comments. I think your idea of applying org-babel to (multi) language support is tremendously suggestive and, of course, more org-centric. I suppose it could be applied also to languages within the paragraph by inline blocks... I really liked what you propose. Well, I admit that my marks are a bit exotic :-D. The main problem I see is that they are not as robust as Org's own marks, since they are controlled by an export filter. Doing some further tests, by the way, I think it would be better to add the filter to `org-export-filter-plain-text-functions', instead of `...final-output-functions'. I also see that it would be convenient to avoid their expansion in verbatim texts, with a `(unless (org-in-verbatim-emphasis)...)'. Anyway, I think (in general terms) it would be interesting for Org to incorporate some multilingual support and the ability to toggle between languages in a document, and the idea you propose seems to me that it makes a lot of sense. Best regards, Juan Manuel=20 Aleksandar Dimitrov writes: > Hi Juan, > > this sounds very interesting to me, as I, too, mostly write in Org > and, sometimes write documents in multiple languages, usually with > different varieties of either Latin or Cyrillic. > > I have some suggestions: > > Apart from the export, one of my biggest gripes is > flyspell. Specifically, the fact that you have to choose one language to > spell check the entire document with. That is insufficient in my case. > > I think that the syntax you're suggesting looks good, but I'm not > sure how well it'd fit into org-mode's ecosystem. I had something in > mind that was closer to how org-babel works (it's called *babel* > for a reason, isn't it? :D) > > #+begin_src org :lang pl > =E2=80=A6 po polsku > #+end_src > > #+begin_src org :lang de > =E2=80=A6 auf deutsch > #+end_src > > > This would make use of org-mode's edit special environment function. It > would make it easier to persuade flyspell to do the right thing. You > could, perhaps, add > > #+LANGUAGE: en > > to the parent document, and then org would take care to set the correct > flyspell language (and the correct macros on LaTeX-export) and change > these parameters in the special environments. > > I'm not 100% sure it should be #+begin_src org, maybe introducing a > different special environment would be better, say #+begin_lang XX where > XX is the ISO-code of said language, or the locale (think en_US > vs. en_GB.) > > The drawback, and the clear disadvantage compared to your method is that > this works great only when the languages are separated by paragraph > breaks. > > Therefore, I think our suggestions might be somewhat orthogonal. Yours > could be a shorthand syntax for introducing inline foreign-language > snippets. > > What do you think? > > Regards, > Aleks > > Juan Manuel Mac=C3=ADas writes: > >> 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=3Dids fonts,hyphenrules=3Drussian]{russian} >> \babelprovide[onchar=3Dids fonts,hyphenrules=3Dancientgreek]{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 > > --=20 --