From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 0Cu4Cv0TkGBKOQAAgWs5BA (envelope-from ) for ; Mon, 03 May 2021 17:17:17 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id IJZNBv0TkGARXwAAbx9fmQ (envelope-from ) for ; Mon, 03 May 2021 15:17:17 +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 DEDA91CDCE for ; Mon, 3 May 2021 17:17:14 +0200 (CEST) Received: from localhost ([::1]:37248 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldaJu-0001XU-0y for larch@yhetil.org; Mon, 03 May 2021 11:17:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41536) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldSXI-000248-UW for emacs-orgmode@gnu.org; Mon, 03 May 2021 02:58:34 -0400 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:40783) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldSXE-00078A-E3 for emacs-orgmode@gnu.org; Mon, 03 May 2021 02:58:32 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 96CC71771 for ; Mon, 3 May 2021 02:58:23 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 03 May 2021 02:58:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aleks.bg; h= references:from:to:subject:in-reply-to:date:message-id :mime-version:content-type:content-transfer-encoding; s=fm2; bh= FfR11ID+GDcVhpicAQ91ntYSerc4ot9jFrA0vOT1RB8=; b=HBd10IKUMSZMD6El /8eou0tQEnmZV/ANlvxVLMBnNU4zVxpm9gD5XRIifDtFzKIKN4DNTA6b6JScLt/z 9sjlNUZ9pNYimc0pOo9M8eaQgpSB7UZq76GPLrnhBKgM8e2WTGwriiykKQ05bjlt tSMe9WU8uPHfp601PemwjynmWQgjs6t4dpPaeSgth05UZY59Hw4rLvHKyIS/HwUY qF+P+FAsYkqKdCx7LGa9j9CpvkJXKrw23kU3wHn4jX5ZOVcY4FqbasX/y2NVPnZm ulwWc/2qmQq/7ANcJNiN/DyW8rxtmQpf5GjMVy0B+7B3cJ6fFgWTLab9co2o13nK Myh+FQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=FfR11ID+GDcVhpicAQ91ntYSerc4ot9jFrA0vOT1R B8=; b=siBxbwehfnGaywbobi4WOckRMI7//YfxweNWE8muim5EuFsyLsAMltGxz xd2z0Xvuwm6WOk/TqSpYNLt4ECiuPixzksgQV2Hn2Wax6UvPK55CXvhfWiCph5MX XozJTbqVvQJ5UZOrN4FCWdT5wnTi8Is6fYpGCDmqByVITl4+aaxfQ63eZnl3Ds12 nI9PiqFk18WVe1nNPCI/5SqmI+MKi/I6W8ITU19P08RFJGNYdfGCYQQo/2IMXSfF akyMJuzO/tzwrvuvdAKd83odFpTpnx9hH5YM5V6d3+O1Snop01O0oJrA3OZIEH7B sPqN2CqcFIl+8DCKtVx4+HdA7ngVA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdeffedgfeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpehffgfhvffujgffkfggtgfgsehtqh ertddtreejnecuhfhrohhmpeetlhgvkhhsrghnuggrrhcuffhimhhithhrohhvuceomhgr ihhlsegrlhgvkhhsrdgsgheqnecuggftrfgrthhtvghrnhephfduleehueejheeuheetve ehhfeuvdejffeggfelgfdvleduheekvdfgvdeujeelnecukfhppeegiedrhedrvdehgedr udekfeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hmrghilhesrghlvghkshdrsghg X-ME-Proxy: Received: from NOAH185-L (hsi-kbw-046-005-254-183.hsi8.kabel-badenwuerttemberg.de [46.5.254.183]) by mail.messagingengine.com (Postfix) with ESMTPA for ; Mon, 3 May 2021 02:58:22 -0400 (EDT) References: <871raosx9a.fsf@posteo.net> User-agent: mu4e 1.5.5; emacs 28.0.50 From: Aleksandar Dimitrov To: emacs-orgmode@gnu.org Subject: Re: About multilingual documents In-reply-to: <871raosx9a.fsf@posteo.net> Date: Mon, 03 May 2021 08:58:11 +0200 Message-ID: <87k0og8fss.fsf@list.aleks.bg> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=64.147.123.20; envelope-from=mail@aleks.bg; helo=wout4-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 03 May 2021 11:16:16 -0400 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=1620055036; 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: 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=FfR11ID+GDcVhpicAQ91ntYSerc4ot9jFrA0vOT1RB8=; b=IDR/9Z5ytH3HJLmH625cnSRbkHrSXRStO8BDS7icPhF9b83h/4AwbSr/vblIvY2pA4DJ+o gjxlV+6pcfaTYS9/dEt3h3PrXV9uJQuNrAHUYixBIRzer2BGvzX72GQcO1d28Ky44ZncbP khtvZi13ZYAXyK62hlrFJebPjzsxcdOBfNNW+rd8ej1ByVnyjPrdVrhe1/wHLoNdAHF45T hmZCPPS61MC55Ljn9nLv2E1jqtATsvJyYtol7qRWtcQnnDEW+AcJR0bPaHL62tM0OBufzZ 2Dv9vpOBUXulav8Fp1ezTxSBSL2TSu+lAnyXbcFWYo6tAlpvkFTY6abVQ481/g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1620055036; a=rsa-sha256; cv=none; b=WoVofcBT7oFiXIWyC8hgo95cojsJEmCQj095sirCYJscuKtdVJi3EwpoLwzZpblS9kUSJM zucnaDc/ECVuuLMz/Sd25kT5H4aOGufJkae93tLC+GsUMZuTtuVSCceZ7KzSLxwaRGD1pc 6x6Uof2JPKKqfZ5lDi20SpDW+ge+j8DNYiz1Be5+xtG4zNIEFNbAvoAf8JNhaWFNWTuKpV KvQ16pNR2eFOWaPqLx/JPnGUjvkQQF+vHbKqvFRevzH7InLWKDg+ByxG8U9u1CHYk157/V SuCapIVZTYcz/I9QGOdFgMTEpqAjaWoWkBd2LFASyZ5iTscX/wA7hngWTLDmZQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=aleks.bg header.s=fm2 header.b=HBd10IKU; dkim=pass header.d=messagingengine.com header.s=fm2 header.b=siBxbweh; 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: -2.66 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=aleks.bg header.s=fm2 header.b=HBd10IKU; dkim=pass header.d=messagingengine.com header.s=fm2 header.b=siBxbweh; dmarc=none; 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: DEDA91CDCE X-Spam-Score: -2.66 X-Migadu-Scanner: scn0.migadu.com X-TUID: skifL0h8gq5s 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