From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id UPa4FMYLrmUdtAAAqHPOHw:P1 (envelope-from ) for ; Mon, 22 Jan 2024 07:31:34 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id UPa4FMYLrmUdtAAAqHPOHw (envelope-from ) for ; Mon, 22 Jan 2024 07:31:34 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=f9AW1lbL; 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=1705905094; 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=sQkRaXS/RUnP/iga2kKu1m3aneskmwVRsgynA1dYhqM=; b=OHDKbmLR37mF77Kl2hti1yH/1YXvNjpLr3HGRx9R8azx9ivKdOYuUPho/7deegtanI0phO kxQnp/aNKq+rf40fkeXNIgbiIaT9/6zYlIrOUuv1cqhKDkVPnF8VESbqs4Bnq6NQRuWbXz kq71KpklS7vQqpFDzjcskU534N3Gzt8ifsqRLg0Sb32Ij5HN6yfzPvkWmh18sCHU/c8MFX w5tPGhKcejNH4uwG2pB4MMw3BlS++ltS/AjvS9e3caEXGK7tWiX7ZTt+sMWi6y0rs15SZq 4VmBJPPXt1I5Uc+Fyd3PyJJDsJ9Q/PAKZNa6zX+5EeiE8s4MzxWxol7tapc69g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=f9AW1lbL; 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-Seal: i=1; s=key1; d=yhetil.org; t=1705905094; a=rsa-sha256; cv=none; b=DtyK3tCrKsqBZjIm90sN1fZh/SBR2xxdekomdgKSHxx4XQwS7Rq5yTPjYXkqtsWif/yKhM D9EcP4iB1ubr+/UVspnofpgLbmkDP5wRh7L1lnzD4OeoSRKz9cfA+36naqigaQCFNvYKbo NWpEXvMuTmZrEQIohG4ka+TzC0k8Mf4+cKIXwfou3vVnYtBUYTK8BpaYbNW0ltiksjSvud FszHqQK3bhgppbucW6n/P1Vu7ZhXXHU4m2ScLuv0DCc933xneVJveF2gomKYuXFpRLuXCm D0kc+Lj/Rr+0IWsRpalK0nWr4PjAXB8iEplweWC+op9iNs0noz6vhdbZjkayDg== 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 0DAF912AB0 for ; Mon, 22 Jan 2024 07:31:34 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rRnpZ-0000sW-W3; Mon, 22 Jan 2024 01:30:50 -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 1rRnpP-0000qO-SW for emacs-orgmode@gnu.org; Mon, 22 Jan 2024 01:30:48 -0500 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rRnpM-00053F-HV for emacs-orgmode@gnu.org; Mon, 22 Jan 2024 01:30:39 -0500 Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-55a45a453eeso3288154a12.0 for ; Sun, 21 Jan 2024 22:30:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705905033; x=1706509833; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=sQkRaXS/RUnP/iga2kKu1m3aneskmwVRsgynA1dYhqM=; b=f9AW1lbLfyyJU0yfhTvletC6Hrt2rAsqjeC+BD60p9PPpDnVgmn6N/sKoONlEs5KLQ 4TWHpGGpvaaK8zrlaTZjsGSMvWeavD7OrrXLr0Dly/kvzZVuW1ipZ8yXwgfVgIul+TGh iI/ck+F31uL+C0LnAYYCiKMXSDpfYwFbTPMK0h0cRxD/mEEN5X/1PlV1VQ30j1Pk3kvB s/muF1ox7Am3P39K/jUqdArW3tTlSIgXfc9HZHoQIXUZMETLItQnfc1gjphq6y3QxRjG OtmvK41vzOVbV6LBIIWAqlOfujWSZWNZ4JwxSPKbBJRlhe5t5quX28HR6EqeuQA3siWK 2o+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705905033; x=1706509833; 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=sQkRaXS/RUnP/iga2kKu1m3aneskmwVRsgynA1dYhqM=; b=G0g9WSSSPD8IkCNFR+l22fvBgBDbJCoeNz+i5X9QihZarCgAykcMLIvsr1BrRXmJPp GPpg9tu/AGIbb8tsfoIy9TurBgivgqxfBHZgZfpYaGwC9Cmsml8pXA/y2IRb1l7ur25c CxbHNpUYLVCUortZJ9W02urmIqOOSdcngDIgFskpyUgDc754YeFP0APSeO6yUIx2GDJx VqvJbEYJEK7MlH+aXHvpY35BHqyDDFxUMjcLB0QXSbr9Y59WWoV07iVJTD9KiHhA3lb9 TgOIlVcktMPMqbrrrZV+DzPjsVvYsDTfo8BJRfd51FFRRjgFynaVCu6K71TPEKmaihAz 9lLQ== X-Gm-Message-State: AOJu0YwbL7vxBCysf6kBIRaJQdemTQb4yO8ILn7BeEfKtwhyBhok5iWK PBzOJgj84UhG2PWLRAL781A+i2WayUATNOmLZ4Kiplk2swF79VZA+0P4JoN/27NsA57dNsRdwoB eB+9rFVcTL/tBJsNrN8V5LTmNDP8HY0U+Oc4= X-Google-Smtp-Source: AGHT+IHL4a9xArU+Q1DFzOXLAbLJsi8qnh01lwoyf0Iu1eOefi/F4+k60AeT7QA4QyRu045qUFpZM0SGlYTSZQRbVmk= X-Received: by 2002:a05:6402:341:b0:55c:4c97:3c23 with SMTP id r1-20020a056402034100b0055c4c973c23mr241240edw.3.1705905033036; Sun, 21 Jan 2024 22:30:33 -0800 (PST) MIME-Version: 1.0 References: <87sf2qg7pg.fsf@localhost> <878r4i37eh.fsf@posteo.net> In-Reply-To: <878r4i37eh.fsf@posteo.net> From: Pedro Andres Aranda Gutierrez Date: Mon, 22 Jan 2024 07:30:06 +0100 Message-ID: Subject: Re: New try at multi-lingual export to latex/pdf using pdflatex and babel To: =?UTF-8?Q?Juan_Manuel_Mac=C3=ADas?= Cc: Ihor Radchenko , Org Mode List Content-Type: multipart/alternative; boundary="00000000000083c5fe060f82f7fe" Received-SPF: pass client-ip=2a00:1450:4864:20::530; envelope-from=paaguti@gmail.com; helo=mail-ed1-x530.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, T_SCC_BODY_TEXT_LINE=-0.01 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-Spam-Score: -7.12 X-Migadu-Scanner: mx13.migadu.com X-Spam-Score: -7.12 X-Migadu-Queue-Id: 0DAF912AB0 X-TUID: 2HlzuxvUmOtK --00000000000083c5fe060f82f7fe Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable HI Juan Manuel, you are absolutely right. There are many things that should improve in the LaTeX exporter and simplifying language treatment is one of them. What I show in my example is how to circumvent all the limitations in the exporter and give a working example for people who need it. Adding AUTO to latex_class_options would be extremely helpful, since then you can load babel indicating the main language only and even avoid the PassOptions and can live with \usepackage{alphabeta} only. This is a MWE for mixing German and Greek which I use to compare with what org-mode generates: ---cut--- \documentclass[greek,ngerman]{scrartcl} %% \documentclass[greek,ngerman]{scrreprt} %% \documentclass[greek,ngerman]{scrbook} %% \documentclass[greek,ngerman]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[ngerman]{babel} %% \PassOptionsToPackage{main=3Dngerman}{babel} \usepackage{alphabeta} \begin{document} Ach, unsere Freunde die Griechen: \textgreek{=CE=BD=CE=BF=CF=85=CF=82} (mit \verb|\textgreek{}|).\par Ach, unsere Freunde die Griechen: =CE=BD=CE=BF=CF=85=CF=82 (direkt im Text)= . \end{document} ---cut--- The commented document classes are all I had the time to test. Best, /PA On Sun, 21 Jan 2024 at 18:47, Juan Manuel Mac=C3=ADas wrote: > Pedro Andres Aranda Gutierrez writes: > > > +#+begin_example > > +,#+latex_class_options: [greek,spanish,oneside] > > +,#+language: es > > +,#+latex_header: \PassOptionsToPackage{main=3Dspanish}{babel} > > +,#+latex_header: \usepackage{alphabeta} % to support greek script > > +#+end_example > > I think this example doesn't take advantage of the AUTO facility, which > is what the section is about. Btw, maybe it would be nice to extend > ''AUTO'' to > latex_class_options and \PassOptionsToPackage? Something like: > > #+latex_class_options: [greek,AUTO,oneside] > #+language: es > ... > > However, I would only find the \PassOptionsToPackage command useful in > classes that already load babel with a main language. From Org, using > just pdfTeX, I think it would be simpler: > > #+language: es > #+latex_header: \usepackage[greek,AUTO]{babel} > #+latex_header: \usepackage{alphabeta} % to support greek script > > or this variant, using babelprovide and an INI file: > > #+language: es > #+latex_header: \usepackage[greek]{babel} > #+latex_header: \babelprovide[import,main]{AUTO} > #+latex_header: \usepackage{alphabeta} > > Best regards, > > Juan Manuel > > > --=20 Fragen sind nicht da, um beantwortet zu werden, Fragen sind da um gestellt zu werden Georg Kreisler Headaches with a Juju log: unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run a leader-deposed hook here, but we can't yet --00000000000083c5fe060f82f7fe Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
HI Juan Manuel,

you are absolutely=C2= =A0right. There are many things that should improve in the LaTeX exporter a= nd simplifying language treatment is one of them. What I show in my example= is how to circumvent all the limitations in the exporter and give a workin= g example for people who need it.=C2=A0

=C2=A0Addi= ng AUTO to latex_class_options would be extremely helpful, since then you c= an load babel indicating the main language only and even avoid the PassOpti= ons and can live with \usepackage{alphabeta} only.
This is a MWE = for mixing German and Greek which I use to compare with what org-mode gener= ates:

---cut---
\documentclass[greek,nge= rman]{scrartcl}
%% \documentclass[greek,ngerman]{scrreprt}
%% \docume= ntclass[greek,ngerman]{scrbook}
%% \documentclass[greek,ngerman]{article= }
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage= [ngerman]{babel}
%% \PassOptionsToPackage{main=3Dngerman}{babel}
\use= package{alphabeta}

\begin{document}
Ach, unsere Freunde die Griec= hen: \textgreek{=CE=BD=CE=BF=CF=85=CF=82} (mit \verb|\textgreek{}|).\parAch, unsere Freunde die Griechen: =CE=BD=CE=BF=CF=85=CF=82 (direkt im Text= ).
\end{document}
---cut---
The commented docume= nt classes are all I had the time to test.

Best, /= PA


On Sun, 21 Jan 2024 at 18:47, Juan Manuel Mac=C3=ADa= s <maciaschain@posteo.net&= gt; wrote:
Pedro= Andres Aranda Gutierrez writes:

> +#+begin_example
> +,#+latex_class_options: [greek,spanish,oneside]
> +,#+language: es
> +,#+latex_header: \PassOptionsToPackage{main=3Dspanish}{babel}
> +,#+latex_header: \usepackage{alphabeta} % to support greek script
> +#+end_example

I think this example doesn't take advantage of the AUTO facility, which=
is what the section is about. Btw, maybe it would be nice to extend '&#= 39;AUTO'' to
latex_class_options and \PassOptionsToPackage? Something like:

#+latex_class_options: [greek,AUTO,oneside]
#+language: es
...

However, I would only find the \PassOptionsToPackage command useful in
classes that already load babel with a main language. From Org, using
just pdfTeX, I think it would be simpler:

#+language: es
#+latex_header: \usepackage[greek,AUTO]{babel}
#+latex_header: \usepackage{alphabeta} % to support greek script

or this variant, using babelprovide and an INI file:

#+language: es
#+latex_header: \usepackage[greek]{babel}
#+latex_header: \babelprovide[import,main]{AUTO}
#+latex_header: \usepackage{alphabeta}

Best regards,

Juan Manuel




--
Fragen sind nicht da, um bea= ntwortet zu werden,
Fragen sind da um gestellt zu werden
= Georg Kreisler

Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should ru= n a leader-deposed hook here, but we can't yet

--00000000000083c5fe060f82f7fe--