From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id mItOEMsPrmXWgwAAqHPOHw:P1 (envelope-from ) for ; Mon, 22 Jan 2024 07:48:43 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id mItOEMsPrmXWgwAAqHPOHw (envelope-from ) for ; Mon, 22 Jan 2024 07:48:43 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=G6uxk36N; 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=1705906123; 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=8A591UdNDfhQiWb1xrjkL25WuKmVgTtfRBcDy65M3cY=; b=u2e6XpXwiIRrZF24BmDBGF5NDRL69hVg458qDIz488t8S+koOrX8/ywKbAdkwxIIoacV4S GxyPd4/dHcvxglnLKVKhQ3vRnStllW78OxZlrOHSOtLaSkO3MtjsqrKQLmC0EHNNp83CzC sx9D+CveKj6+RnzD0mBAAC8XPnzsdoHI+rVcEdoOB+UfcXmm1u5uXXRwopwBqfVoupwoYa 8T/yBDZNaDsJHjz556wca6qUfxji8c6ispngsS/WzsJa33OjryhvQzgq0XevDBe3l4RhDi sced7uuauquPLgNUVmcFEZaILiviGy4TWJZaBsWlJMOCny5VhcIJrim6VEHGCA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=G6uxk36N; 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=1705906123; a=rsa-sha256; cv=none; b=DFxK5kxeknLJJJf384sR+lzKOyYWOs1MWkosoMuo5AFP0X6f+KnJPC8idK+XIMU7A1nJWL XuFaH6199BovKWV1ItNgMc9gnmmNFM/rOJVU183u372hbzS3IuGMNAKzjmNzAjswcLXAtP FYliTtZQlkKX37K3qiWN8lnh6kQQQbZGO6OBjHU6fdIiRhlJJqGRNhYuXQb1Dxhc4DYyMf YBHysocOc9UiVdq9/au0Px8nBeeuPDiSBsIMV3jNJ5C9twJcLuTtBKXxp+H5qcT3Ife+7V iGANrzoNpKsoVj+IIERtO3Hx7tKWmqGl6oWuX6eviIzURFjuu+W5tWvcoBlGjg== 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 D3DA546879 for ; Mon, 22 Jan 2024 07:48:42 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rRo5y-0000GC-L0; Mon, 22 Jan 2024 01:47:46 -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 1rRo5o-0000DY-4H for emacs-orgmode@gnu.org; Mon, 22 Jan 2024 01:47:36 -0500 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rRo5l-00083u-KX for emacs-orgmode@gnu.org; Mon, 22 Jan 2024 01:47:35 -0500 Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-50eabfac2b7so3328535e87.0 for ; Sun, 21 Jan 2024 22:47:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705906051; x=1706510851; 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=8A591UdNDfhQiWb1xrjkL25WuKmVgTtfRBcDy65M3cY=; b=G6uxk36N2F99SpUM4EfhH+ROx1dMSYBBnubUx54VQKHz458oIcor33bYPwLaR/3CAt /XL9eFCot9p9Ifsf1rgFZ/+BBCrolxjbN3afqrOd1cdSYPrDEpR2MlJzqUevcV3pFELr JDLAE/pQE8+LtsNfhVys0K7Jr5Q0VXlUv+cJWFwutxnjPiFt9gjwzfkPj57qfEY4/UX3 sRlSnnBxTNBBIggtkGH0Cy1DgKngmFdtCggSPIiC/08212VN9qtjNmrBvEpe/i/64DbA fnv7v6Q2I2I1A1TMir8fiB/s2tDhh2ZJC7tYyFYlOiJB3qkVoNaYh6R5ehFUJvcMA6Tt A/iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705906051; x=1706510851; 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=8A591UdNDfhQiWb1xrjkL25WuKmVgTtfRBcDy65M3cY=; b=r42umSKP7YcLJsroEEDNyssEyMyveqCR4ilQFVHEdgP0eY53n0m+VvhwSvt0fTU46p tMPL/2uucbhfNROgzgL8FEVIhozQIr2ncBF4P/bH3e4E/knx1aOblpbATemz6S/y7pwP pP4YldFpOOeGOwKNgDfckMX1qAO4ZuKvQQHAR9KmkBvuaTzrj+HUQMw8YoLCy4bNBVPB ucDKreyTcFuQjjXZVPCYSmEt9psRfyJxyqvmPLcq5ZEhaulD0PPu6acwUjRoZra6TmjL prbKOr6WP1oYaYtoF7U3oIz5Jsd7JRmhpmvY9T3tT5yfFCmeCRIsS8n/mKXBp1fnU13z dI2g== X-Gm-Message-State: AOJu0YwgAaTMlVMFFp1D4m5/+1OTUKG8piC+jVXwdk9T31M++1BJNkKK TdzxVbIdsurvdt4H+PxZ00bEf9rfzoN3Oei6SASN1b6wyVhX1SZkVRc4Wm2gvecw85rp3DrDc8M i0YGuEWC0146j1bhqZkKq/tHwJ1ekX8P4An8= X-Google-Smtp-Source: AGHT+IH2IVDYiAtDxBkkWm9ZZnXLVStgbtPFOK//1JsUOtqDDt/9PgovQkryKxZyCFPy+15seY3nE8sv/0TmvG9hG+g= X-Received: by 2002:a05:6512:2210:b0:50f:1c85:353 with SMTP id h16-20020a056512221000b0050f1c850353mr1549714lfu.102.1705906051288; Sun, 21 Jan 2024 22:47:31 -0800 (PST) MIME-Version: 1.0 References: <87sf2qg7pg.fsf@localhost> <878r4i37eh.fsf@posteo.net> In-Reply-To: From: Pedro Andres Aranda Gutierrez Date: Mon, 22 Jan 2024 07:47:05 +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="000000000000351406060f8334ae" Received-SPF: pass client-ip=2a00:1450:4864:20::12e; envelope-from=paaguti@gmail.com; helo=mail-lf1-x12e.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: -8.22 X-Migadu-Queue-Id: D3DA546879 X-Spam-Score: -8.22 X-Migadu-Scanner: mx11.migadu.com X-TUID: 6rjQo9VoQ5Sk --000000000000351406060f8334ae Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable PS: This is a very limited example. It would be nice to have more control on fontenc. AFAIK there is not alphabeta for cyrillic encodings and typesetting 'War and Peace' with its passages in French embedded in the Russian text is sort of a headache ;-) /PA On Mon, 22 Jan 2024 at 07:30, Pedro Andres Aranda Gutierrez < paaguti@gmail.com> wrote: > HI Juan Manuel, > > you are absolutely right. There are many things that should improve in th= e > 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 export= er > and give a working example for people who need it. > > Adding AUTO to latex_class_options would be extremely helpful, since the= n > 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 wha= t > 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} (m= it > \verb|\textgreek{}|).\par > Ach, unsere Freunde die Griechen: =CE=BD=CE=BF=CF=85=CF=82 (direkt im Tex= t). > \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 >> >> >> > > -- > 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 ru= n > a leader-deposed hook here, but we can't yet > > --=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 --000000000000351406060f8334ae Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
PS: This is a very limited example. It would be nice to ha= ve more control on fontenc. AFAIK there is not alphabeta for cyrillic encod= ings and typesetting 'War and Peace' with its passages in French em= bedded in the Russian text is sort of a headache ;-)

/PA=

On Mon, 22 Jan 2024 at 07:30, Pedro Andres Aranda Gutierrez <paaguti@gmail.com> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l= eft:1px solid rgb(204,204,204);padding-left:1ex">
HI Juan M= anuel,

you are absolutely=C2=A0right. There are many thi= ngs that should improve in the LaTeX exporter and simplifying language trea= tment is one of them. What I show in my example is how to circumvent all th= e limitations in the exporter and give a working example for people who nee= d it.=C2=A0

=C2=A0Adding AUTO to latex_class_optio= ns would be extremely helpful, since then you can load babel indicating the= main language only and even avoid the PassOptions and can live with \usepa= ckage{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}
%% \docum= entclass[greek,ngerman]{scrreprt}
%% \documentclass[greek,ngerman]{scrbo= ok}
%% \documentclass[greek,ngerman]{article}
\usepackage[utf8]{input= enc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
%% \Pass= OptionsToPackage{main=3Dngerman}{babel}
\usepackage{alphabeta}

\b= egin{document}
Ach, unsere Freunde die Griechen: \textgreek{=CE=BD=CE=BF= =CF=85=CF=82} (mit \verb|\textgreek{}|).\par
Ach, unsere Freunde die Gri= echen: =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 Su= n, 21 Jan 2024 at 18:47, Juan Manuel Mac=C3=ADas <maciaschain@posteo.net> wrote:=
Pedro Andres Ar= anda 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



--
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

--000000000000351406060f8334ae--