From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id qPSdAavAMmN3ZAEAbAwnHQ (envelope-from ) for ; Tue, 27 Sep 2022 11:21:47 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id IAjcAKvAMmN4VgEAG6o9tA (envelope-from ) for ; Tue, 27 Sep 2022 11:21:47 +0200 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 959D81FEBE for ; Tue, 27 Sep 2022 11:21:46 +0200 (CEST) Received: from localhost ([::1]:37798 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1od6mf-0002tM-BM for larch@yhetil.org; Tue, 27 Sep 2022 05:21:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58216) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1od6ab-00069p-NO for emacs-orgmode@gnu.org; Tue, 27 Sep 2022 05:09:17 -0400 Received: from mout02.posteo.de ([185.67.36.66]:42555) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1od6aY-0008UY-Tj for emacs-orgmode@gnu.org; Tue, 27 Sep 2022 05:09:17 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id BF3C7240101 for ; Tue, 27 Sep 2022 11:09:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1664269751; bh=8m6UyzEoMMiyfqoBbocsQSBqq7z9e9PPyheMHN8WBg0=; h=From:To:Subject:Date:From; b=b9cGZaPAShqc5gBOIigrNiH6cSenaEsn5Qv3IgmOPNEf8fJ/ijMxxoOboAH5t3kk3 jSehigaCmxHBwNYqTgkiPq9NF1NuFoJlWSGYP/0l4t7vFHZ7UoAdO69R1vDD9eSYba 2s6qduDRO8+1WNLFDFYaNSpysCtsRoNZcJUOpnZupTU3PBl3IAYjyOAckrL1YeFg6q Zx5hFNG23SxW0nDyiXcb1kZAsriH3q0q67DEq1rC7ROe4+lpxRGXA706nlGiRSdwlP LCrqFDdviQrZA8aTD4mm0PgLhVSqi/2HtbH0yoLWJ9rrkGZmedF+ISAcpNjHbCpYW+ h5+19XQ7iytdQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4McDMW1f0Bz6tmg for ; Tue, 27 Sep 2022 11:09:10 +0200 (CEST) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: orgmode Subject: Create in Org a bilingual book with facing pages Date: Tue, 27 Sep 2022 09:09:08 +0000 Message-ID: <87h70tyyiz.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: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.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, HOSTED_IMG_MULTI_PUB_01=2.999, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1664270506; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=8m6UyzEoMMiyfqoBbocsQSBqq7z9e9PPyheMHN8WBg0=; b=ULlN5adLurpNtL0gpdMDvrnZtWN68zvzPt3wjVgfVzMclwIFMqT/CreCaPcg+AsMjlNRHY 39YhZpTA72spuyhpHuOBXtGxM8R2aYcCZxZcL3m8njqrCdMERzH3qZRC9ND4EahZPEWpe+ b/r7QWJsaVRfpR8mruQNlgEkYc347GM5zrHWBnp/TikxjcYlBWkjz6dZ333N6+lKLzDHc5 ilAgmTLzR5uA4iwXRYofAA5x1EB5Jb55UTQrQRx7yNHNNDZBBSjZpBJe+Av6gd25cN43R0 EsuQeX8q26R1L6y2JtU67JdZnbUz3ltuLMdjslzlptJZo/1IUq7GI2+VlSXamg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664270506; a=rsa-sha256; cv=none; b=Netr66OpRTeQhp6FGZlyV14Gz+z/J5rg3Aqa44Bc1Z08jSCEdBZeSaKGeGg/QixXyZZiZx 4oIEOxKtjAAhhnu0qHd50y2NQ7eu/5uJDSWg/JY1NFq1ntXKbxlESFxp8Rxdni9x9CTb7h 8RWcLYnAFUBqx+HxohgPXfDuyeQU0RF36Z44ExJyUI24vlP/r+g4tks17oQacfcSf2QfDF cHa0JZY+oHSyYVfIO0ygf11ns9S/+ijkdUAwRmky7cLTpkOYlmf9cvUZSgNlkBN12S9Afw wBhkMobqZgi/HXEf1kGVSJc2gCe0G0DN0EIbQTHeP/1rk9cEltRNWaz3Aim2Hw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=b9cGZaPA; dmarc=pass (policy=none) header.from=posteo.net; 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" X-Migadu-Spam-Score: -2.54 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=b9cGZaPA; dmarc=pass (policy=none) header.from=posteo.net; 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" X-Migadu-Queue-Id: 959D81FEBE X-Spam-Score: -2.54 X-Migadu-Scanner: scn1.migadu.com X-TUID: OW87aaByNLzI Hi all, TL; DR: The bilingual critical edition (ancient Greek/Spanish) of the letters of Demosthenes and Aeschines has recently been published in Spain, a book whose production and typesetting I have taken charge of, using Org and Org-publish. Although I already have a long experience typesetting bilingual editions of a certain complexity, especially for philological use, I had never done it until now by centralizing the entire process in Org-Mode. I have to say that it has been a very interesting experience, so I leave here below a brief description of the process and some tips, in case they can be useful to someone who wants to prepare from Org bilingual texts with facing pages and certain complexity. BTW, Here=E2=80=99s a sample of two pages from the book: Long version: First of all, for this kind of work you have to take into account an inherent limitation of TeX: the compilation process in TeX is a single-threaded process. That is, in TeX you cannot compile different parts of a document, with different configurations (=3D different preambles), at the same time. For example, you cannot have one configuration for odd pages and another for even pages (original and translation) and compile them in parallel and asynchronously. In Adobe InDesign-style DTP programs you can load multiple page threads in parallel, but these programs don=E2=80=99t have the typographic refinement = of TeX. And besides, I never use proprietary software ;-). Therefore, to create a bilingual edition with facing pages, and for this particular type of book where the odd pages (the text in Greek) is a critical edition with a strong critical apparatus (https://en.wikipedia.org/wiki/Critical_apparatus), it is necessary to compile two separate documents and then synchronize them. The good news: I have found that, thanks to Org, the process is much more streamlined and controlled. On the other hand, since in this book the content of the odd and even pages is variable, the synchronization has been done per page, so that the reader always obtains the same content on the odd and even page when facing the open book. For the Greek document I used the reledmac LaTeX package, which is the most mature LaTeX package for philological critical editions, but I used it through my org-critical-edition package (). Once both PDFs are obtained and synchronized, they are loaded into the master Org document using the pdfpages LaTeX package. Since it was necessary to introduce in certain pages some commands specific to each page, such as page styles, index entries or labels for references, and to avoid having to load the pages one by one with pdfpages commands, I wrote a function that obtains the number of pages of the synchronized PDF (via mutool) and it does all that work. The function has three arguments: the path to the synced PDF, the general page command, and a list of page numbers with particular commands (these last two arguments are optional). An example of use would be: =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=82 (inserta-pdfpages-bi "resultado.pdf" "\\thispagestyle{plain}" '((= 2 "\\label{some-label}")))=20 =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 The function is evaluated in the master document within a source block: To compile the two PDFs separately and get the PDF in sync, I also do it from Org using a shell source block. So I have all PDFs always synchronized up to date. The synchronized PDF is obtained with pdftk: The rest of the book, introduction, indices, etc. it is normally done via Org publish. And the final compilation (the master document that includes all sub-documents) is done asynchronously using latexmk. And that=E2=80=99s it. The next challenge for this fall is going to be a trilingual edition of the New Testament (Greek, Latin, Spanish). My idea is to try to adapt to Org the use of the LaTeX package flowfram (an attempt to create dynamic indesign-style text boxes in LaTeX, but ---because of TeX's limitations--- they would not be asynchronous boxes). Then, each text in a language would go inside an org block. We'll see how it turns out :-) Best regards, Juan Manuel --=20 -- ------------------------------------------------------ Juan Manuel Mac=C3=ADas https://juanmanuelmacias.com https://lunotipia.juanmanuelmacias.com https://gnutas.juanmanuelmacias.com