From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id QOiIA3z3M2NC/QAAbAwnHQ (envelope-from ) for ; Wed, 28 Sep 2022 09:27:56 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 0MFMA3z3M2NGLgAAauVa8A (envelope-from ) for ; Wed, 28 Sep 2022 09:27:56 +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 A4E122F000 for ; Wed, 28 Sep 2022 09:27:55 +0200 (CEST) Received: from localhost ([::1]:37706 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1odRU1-00038X-N6 for larch@yhetil.org; Wed, 28 Sep 2022 03:27:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43420) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odRGi-0006rq-UV for emacs-orgmode@gnu.org; Wed, 28 Sep 2022 03:14:09 -0400 Received: from mailer-211-145.hitrost.net ([91.185.211.145]:58987) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odRGg-0007iZ-5b for emacs-orgmode@gnu.org; Wed, 28 Sep 2022 03:14:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=christianmoe.com; s=x; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-ID:Date:In-reply-to:Subject:To:From:References:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=zFprJXm5e8geJjKwW0e3vAJwhWwnH7LvP1vZhDtd3Ys=; b=sevV8cCFbZjlC1PDLRkC9IDT7R O0C0wyipGwqCilvATm5+TSs+rXggTcIfr6CAzRY2deGGogQhAnO/USL8LTxMtT1jJrKSPkJSof8QV +NFn8DHm1pg3qjm4Qx35fTMKfT74Wt0NFHYlYCa4bsRFcVUkyl7McCzmNVCksrcJBbrXrz6Sxy4HW gKbk6JG5xYjaTjxTFwpufSeSg9bg7WpOdGHkDZy5SHOUiMDe1mvvAqM2Q5zS2oP9MbSMQXks1G6o4 oaUXNHq6BvFmtzZouNG8yXZ7pOY6qapNHBBofvgiT6uGv0OeCS13WqP04fJ//8+hrg8srmNXrIuIi IwxeH+/Q==; Received: from 84-20-244-215.dynamic.telemach.net ([84.20.244.215] helo=Tauriel) by b1.hitrost.net with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1odRGb-002gYc-1C; Wed, 28 Sep 2022 09:14:01 +0200 References: <87h70tyyiz.fsf@posteo.net> User-agent: mu4e 1.2.0; emacs 27.2 From: Christian Moe To: emacs-orgmode@gnu.org Subject: Re: Create in Org a bilingual book with facing pages In-reply-to: <87h70tyyiz.fsf@posteo.net> Date: Wed, 28 Sep 2022 09:14:00 +0200 Message-ID: <87r0zwm0nb.fsf@christianmoe.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-GeoIP: Country [IP], SI [84.20.244.215] X-Antivirus-Scanner: Clean mail though you should still use an Antivirus X-Authenticated-Id: mail@christianmoe.com Received-SPF: pass client-ip=91.185.211.145; envelope-from=mail@christianmoe.com; helo=mailer-211-145.hitrost.net X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, 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-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1664350075; 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=zFprJXm5e8geJjKwW0e3vAJwhWwnH7LvP1vZhDtd3Ys=; b=KcXDGQrqzze093gvZlsFXa1zOkAUwk7pcpgHmw2w/nMebHwbkyA9YiJ4u3W1QUjPGNiPSl UmWz71XQjIXq4hx77eI7lMtMx14fZQF6lCtm/fkghbifCNi9YZ3y8tD2zUYjbH8yAcEkWO UUFL6pPobpuuxzfkG1wuBBodnxVjjNfNMhxCb/DJ7fFdiB/hB6FdCbfNRnRWpIMRwA3iwr JlwKL76sx7W8l/q0ndhRlfO9bofvR8DGivr7YAKJ0KX5pnOC+2I16MYE1jhYi4VvXL92zA sdIF7g/CKBTH1UuggaH25wc3AGvLTt+o91pqrelFk9iF1YfYuOz6UatAr3r2kQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664350075; a=rsa-sha256; cv=none; b=TvN9YrvO6w2flcC8FL2rthqqHtKR7DNVzVfnS1GC5QDWt/1gxbxFDIt2dIjzKkO0Alyxib vZ1wo/9oA14f8XXao1erJtPjPPT6C/C4YlgmdLNGhpA2/9Jxl9gcIEMvRQmTJ4h8Dqx50z 6Tgm5afLYwktcz+nNjuRw4m1kKmVdHn6u/ClJpaqWs3FmgbJDIZErX/Z/pqPMU/C2aoOxn kJuF27b9GPM4URdSdJPYols2g8XTKNlD+6ffc02AMIT1eEEMZlmCGxgouajMl8k1jA4z2u r3BLJuDPRfea/0uUpn7132kzyWoG4YoFRrb/hfl3UwyDN6uC870Ba2jf6YU1cg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none ("invalid DKIM record") header.d=christianmoe.com header.s=x header.b=sevV8cCF; dmarc=none; 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: -3.95 Authentication-Results: aspmx1.migadu.com; dkim=none ("invalid DKIM record") header.d=christianmoe.com header.s=x header.b=sevV8cCF; dmarc=none; 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: A4E122F000 X-Spam-Score: -3.95 X-Migadu-Scanner: scn0.migadu.com X-TUID: P+bEde5SJ3Rj Hi, Juan Manuel, I keep saving your messages with process documentation for future reference should I ever attempt anything similar. Much appreciated! Yours, Christian Juan Manuel Mac=C3=ADas writes: > 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 refinemen= t 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}"))) > =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 > > --