emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Create in Org a bilingual book with facing pages
@ 2022-09-27  9:09 Juan Manuel Macías
  2022-09-27 12:29 ` Ihor Radchenko
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Juan Manuel Macías @ 2022-09-27  9:09 UTC (permalink / raw)
  To: orgmode

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’s a sample of two pages from the book:

<https://i.imgur.com/XUOGEnf.png>

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 (= 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’t 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
(<https://gitlab.com/maciaschain/org-critical-edition>).

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:

┌────
│ (inserta-pdfpages-bi "resultado.pdf" "\\thispagestyle{plain}" '((2 "\\label{some-label}"))) 
└────

The function is evaluated in the master document within a source block:

<https://i.imgur.com/yps6xRA.png>

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:

<https://i.imgur.com/qbSg2po.png>

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

-- 
--
------------------------------------------------------
Juan Manuel Macías

https://juanmanuelmacias.com

https://lunotipia.juanmanuelmacias.com

https://gnutas.juanmanuelmacias.com



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Create in Org a bilingual book with facing pages
  2022-09-27  9:09 Create in Org a bilingual book with facing pages Juan Manuel Macías
@ 2022-09-27 12:29 ` Ihor Radchenko
  2022-09-27 16:50   ` Juan Manuel Macías
  2022-09-27 16:34 ` Create in Org a bilingual book with facing pages Hendursaga
  2022-09-28  7:14 ` Christian Moe
  2 siblings, 1 reply; 17+ messages in thread
From: Ihor Radchenko @ 2022-09-27 12:29 UTC (permalink / raw)
  To: Juan Manuel Macías; +Cc: orgmode

Juan Manuel Macías <maciaschain@posteo.net> writes:

> 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’s a sample of two pages from the book:
>
> <https://i.imgur.com/XUOGEnf.png>

Thanks for sharing!

This post appears to be a nice fit for
https://orgmode.org/worg/org-blog-articles.html (except non-permanent
imgur links). Do you have an Org version? Or maybe an actual blog post?

> 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:
>
> <https://i.imgur.com/qbSg2po.png>

I notice two things here:

1. \clearpage command, which reminds me about
   https://orgmode.org/list/87mtamjrft.fsf@localhost
   May it be useful to have page break syntax element in Org?

2. You had to use direct LaTeX for caption. Can we do something to make
   the #+caption keywords more useful?

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Create in Org a bilingual book with facing pages
  2022-09-27  9:09 Create in Org a bilingual book with facing pages Juan Manuel Macías
  2022-09-27 12:29 ` Ihor Radchenko
@ 2022-09-27 16:34 ` Hendursaga
  2022-09-28  6:14   ` Juan Manuel Macías
  2022-09-28  7:14 ` Christian Moe
  2 siblings, 1 reply; 17+ messages in thread
From: Hendursaga @ 2022-09-27 16:34 UTC (permalink / raw)
  To: Juan Manuel Macías, orgmode

Juan Manuel Macías <maciaschain@posteo.net> writes:

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

What is the name of this book / the publisher's page? I don't really know Spanish, and only a little Greek, but I'm fascinated by bilingual editions, especially with critical apparati. I've been looking for a workflow for creating my own (possibly critical) bilingual works, but so far, months later, I haven't really found anything satisfactory.

> 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 (= different preambles), at the same time.

To clarify: you mean that you would have to have two distinct documents so that, say, the page titles, fonts, indices, etc can be specific to that "language half" of a work? I would've thought you could just have everything in one document. That's how I've been (trying to) do it so far, using the reledpar package, an extension of reledmac. Did you / have you tried using that? I've also tried various other packages, like the parallel package.

> 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[...]

I've looked at reledmac, and I agree, it is pretty sophisticated. Can you clarify which synchronization method(s) you use? If you do use reledpar, in section 6.2.2, it lists the different ways you can synchronize. Otherwise, could you try to explain in terms it uses?

> 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. [...]

To clarify once more: when you introduce page-specific commands, is this in the original PDF documents that you generate, or are those, like, trimmed and then you add on the headers etc later, or what?

> And that’s it. The next challenge for this fall is going to be a trilingual edition of the New Testament (Greek, Latin, Spanish). [...]

Are you aware of Kevin Klement's trilingual edition[1] of Wittgenstein's Tractatus Logico-Philosophicus? (OK, it's technically bilingual, but with two separate English translations along with the original German!) He uses PHP (gross, I know!) to collate everything into a LaTeX document to then generate the various final versions. Besides the PHP, you might pick up a technique or two! (Or three!)

~ Hendursaga

[1] https://people.umass.edu/klement/tlp/


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Create in Org a bilingual book with facing pages
  2022-09-27 12:29 ` Ihor Radchenko
@ 2022-09-27 16:50   ` Juan Manuel Macías
  2022-09-28  3:15     ` Ihor Radchenko
  0 siblings, 1 reply; 17+ messages in thread
From: Juan Manuel Macías @ 2022-09-27 16:50 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: orgmode

Hi, Ihor, thanks for your comments.

Ihor Radchenko writes:

> This post appears to be a nice fit for
> https://orgmode.org/worg/org-blog-articles.html (except non-permanent
> imgur links). Do you have an Org version? Or maybe an actual blog post?

Precisely I have in mind to publish in my blog on typography
(https://lunotipia.juanmanuelmacias.com/) an extended and more detailed
version of this text, also including the function to which I refer (and
that I have not included in the post to the list for not making the text
any longer). The drawback is that my blog is in Spanish. I can easily
make an English version of the blog post as well. Who should I send the
link to, when I post it?

>> 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:
>>
>> <https://i.imgur.com/qbSg2po.png>
>
> I notice two things here:
>
> 1. \clearpage command, which reminds me about
>    https://orgmode.org/list/87mtamjrft.fsf@localhost
>    May it be useful to have page break syntax element in Org?

I really don't have an opinion at the moment... As a user I try to put
as few direct LaTeX commands as possible: commands like \newpage,
\pagebreak, \clearpage, \bigskip, \quad, etc. Whenever I can, I
prefer to control spaces and page breaks using more general macros. And,
when I put these commands, the fact of resorting to an export snippet
does not usually bother me, since they are not very verbose commands.
But I don't know what other users will think...

> 2. You had to use direct LaTeX for caption. Can we do something to make
>    the #+caption keywords more useful?

Yes, I use direct LaTeX in that case because I need to put the command
\caption*, the starred version of \caption provided by the caption
package. And before \caption*, I wanted to also add a \captionsetup. For
those cases, I think the :caption attribute already does a good job.
What would be interesting (IMO) is to be able to introduce arbitrary code
within the figure environment through an attribute, but this is where
the possible :export_template attribute could come into play, as we
discussed in the other thread.

Best regards,

Juan Manuel 

-- 
--
------------------------------------------------------
Juan Manuel Macías 

https://juanmanuelmacias.com

https://lunotipia.juanmanuelmacias.com

https://gnutas.juanmanuelmacias.com




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Create in Org a bilingual book with facing pages
  2022-09-27 16:50   ` Juan Manuel Macías
@ 2022-09-28  3:15     ` Ihor Radchenko
  2022-09-28  7:50       ` Explicit page breaks (was: Create in Org a bilingual book with facing pages) Juan Manuel Macías
  0 siblings, 1 reply; 17+ messages in thread
From: Ihor Radchenko @ 2022-09-28  3:15 UTC (permalink / raw)
  To: Juan Manuel Macías; +Cc: orgmode

Juan Manuel Macías <maciaschain@posteo.net> writes:

> Ihor Radchenko writes:
>
>> This post appears to be a nice fit for
>> https://orgmode.org/worg/org-blog-articles.html (except non-permanent
>> imgur links). Do you have an Org version? Or maybe an actual blog post?
>
> Precisely I have in mind to publish in my blog on typography
> (https://lunotipia.juanmanuelmacias.com/) an extended and more detailed
> version of this text, also including the function to which I refer (and
> that I have not included in the post to the list for not making the text
> any longer).

Sounds good.

> The drawback is that my blog is in Spanish. I can easily
> make an English version of the blog post as well. Who should I send the
> link to, when I post it?

We already link to some non-English talks about Org.
It is just a matter of indicating the language near the WORG link.
Having both English and Spanish will be even better.

To add your blog article link to WORG, you can just make a patch against
https://git.sr.ht/~bzg/worg/tree/master/item/org-blog-articles.org

>> 1. \clearpage command, which reminds me about
>>    https://orgmode.org/list/87mtamjrft.fsf@localhost
>>    May it be useful to have page break syntax element in Org?
>
> I really don't have an opinion at the moment... As a user I try to put
> as few direct LaTeX commands as possible: commands like \newpage,
> \pagebreak, \clearpage, \bigskip, \quad, etc. Whenever I can, I
> prefer to control spaces and page breaks using more general macros. And,
> when I put these commands, the fact of resorting to an export snippet
> does not usually bother me, since they are not very verbose commands.
> But I don't know what other users will think...

Fine-tuning commands should indeed be dedicated to specific export
backends. It is generally meaningless to have \clearpage in html export.

However, \pagebreak specifically is something people use in plain text
files, and it may be useful for odt exports.

>> 2. You had to use direct LaTeX for caption. Can we do something to make
>>    the #+caption keywords more useful?
>
> Yes, I use direct LaTeX in that case because I need to put the command
> \caption*, the starred version of \caption provided by the caption
> package. And before \caption*, I wanted to also add a \captionsetup. For
> those cases, I think the :caption attribute already does a good job.
> What would be interesting (IMO) is to be able to introduce arbitrary code
> within the figure environment through an attribute, but this is where
> the possible :export_template attribute could come into play, as we
> discussed in the other thread.

:export_template will indeed work for LaTeX. What I am looking for here
is some useful functionality that may be generalized to multiple export
backends.

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Create in Org a bilingual book with facing pages
  2022-09-27 16:34 ` Create in Org a bilingual book with facing pages Hendursaga
@ 2022-09-28  6:14   ` Juan Manuel Macías
  2022-09-28 14:14     ` Hendursaga
  0 siblings, 1 reply; 17+ messages in thread
From: Juan Manuel Macías @ 2022-09-28  6:14 UTC (permalink / raw)
  To: Hendursaga; +Cc: orgmode

Hi, thank you for your comments.

Hendursaga writes:

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

> What is the name of this book / the publisher's page? I don't really
> know Spanish, and only a little Greek, but I'm fascinated by bilingual
> editions, especially with critical apparati. I've been looking for a
> workflow for creating my own (possibly critical) bilingual works, but
> so far, months later, I haven't really found anything satisfactory.

Demóstenes y Esquines, Cartas atribuidas. Publisher: Dykinson.

Perhaps it is not yet in the catalog, because the book is very recent.
On this page you can see other critical editions (among other books)
that I have produced:
https://maciaschain.gitlab.io/lunotipia/muestra_trabajos.html. Certainly
critical editions are some of the most fascinating kinds of books out
there. My favorites are the Oxford Classical Texts, the Budé Collection,
and Teubner. In bilingual format the Loeb Classical Texts are also
excellent. All these have marked a canon.

>> 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 (=
>> different preambles), at the same time.
>
> To clarify: you mean that you would have to have two distinct
> documents so that, say, the page titles, fonts, indices, etc can be
> specific to that "language half" of a work? I would've thought you
> could just have everything in one document. That's how I've been
> (trying to) do it so far, using the reledpar package, an extension of
> reledmac. Did you / have you tried using that? I've also tried various
> other packages, like the parallel package.

I think that the automatic synchronization of the facing pages of a
bilingual editions, either in TeX or in any other software, is a utopia.
Or, to be less radical and pessimistic, that is something possible in
very few scenarios. The ideal scenario would be for text A and text B to
have *exactly* the same number of lines and the same content per page.
This rarely happens. When it comes to poetry in verse it is more common
to happen. But factors such as the corpus of footnotes or the critical
apparatus, which are parts of the page with a variable height, also have
an influence. In the case of this book there was a significant gap
between the two texts. That is to say, that in the end a manual
intervention is necessary to balance the pages according to the content.

In the case of TeX/LaTeX, the single-thread TeX limitation is also
added. Packages like parallel (or paracol, which is newer) work fine
when dealing with simple text. At more complexity they are unusable. And
furthermore, in this case text A is a critical edition that needs its
own configuration. Parallel or paracol simply don't work here.

The case of reledpar could be the solution (since it is a version of
reledmac for parallel texts), but, unfortunately, it almost never is.
Reledpar works fine (more or less) when the scenario I mentioned at the
beginning occurs: if text A and text B are almost identical in length
page to page and paragraph to paragraph. Otherwise, manual
synchronization becomes very difficult and reledpar has a very erratic
behavior. Reledmac is wonderful, but I think reledpar is not a good
package and my recommendation is to avoid using it if possible.

As I said at the beginning, the ideal in TeX/LaTeX would be to be able
to compile with true parallel threads of text with a different
configuration, which is impossible. So my strategy is to create two
separate documents and load them with pdfpages. The good thing is that
Org helps a lot in this process, giving the feeling that I am working
with true parallel threads, since all the processes involved are
asynchronous.

>> 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[...]
>
> I've looked at reledmac, and I agree, it is pretty sophisticated. Can
> you clarify which synchronization method(s) you use? If you do use
> reledpar, in section 6.2.2, it lists the different ways you can
> synchronize. Otherwise, could you try to explain in terms it uses?

You might also want to take a look at ekdosis, a new package for
critical editions. It is not as complete as reledmac (for now), but it
has some interesting features, such as the possibility of exporting to
TEI.

As for what you ask me about the synchronization, this one is visual. It
is inevitable, from what I said before. And I think it is also
necessary. No matter how sophisticated typographic software is, in the
end human intervention is always necessary for things like this, which
depend on content and not on form. And for things like correcting
typographic rivers and such. Maybe in the not too distant future we can
train an IA to do it, but at the moment TeX doesn't understand content
:-). Of course, this synchronization must be done when both texts are
already hypercorrected. It is enough to add some marks to the text,
indicating where to generate a cut. Reledmac has the \ledpb command for
it, which I have redefined like this:

\makeatletter
\renewcommand{\led@check@pb}{\xifinlist{\the\absline@num}{\l@prev@pb}{\clearpage}{}}
\makeatother

>> 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. [...]
>
> To clarify once more: when you introduce page-specific commands, is
> this in the original PDF documents that you generate, or are those,
> like, trimmed and then you add on the headers etc later, or what?

Page-specific commands (such as page styles, reference labels, and so
on) are not in the original PDFs but are passed through the pdfpages
package, using the 'pagecommand' key. For example, with PDF pages you
can put something like (for page 1):

\includepdf[pages={1},noautoscale=true,pagecommand={\thispagestyle{empty}\label{foo}]{file.pdf}

What my function does is get the number of pages in the PDF and do all
that work, adding the commands I want on the needed page.

>> And that’s it. The next challenge for this fall is going to be a
>> trilingual edition of the New Testament (Greek, Latin, Spanish).
>> [...]
>
> Are you aware of Kevin Klement's trilingual edition[1] of
> Wittgenstein's Tractatus Logico-Philosophicus? (OK, it's technically
> bilingual, but with two separate English translations along with the
> original German!) He uses PHP (gross, I know!) to collate everything
> into a LaTeX document to then generate the various final versions.
> Besides the PHP, you might pick up a technique or two! (Or three!)

Interesting. For critical editions (among other text types for
Humanities), the standard for storing textual data is TEI
(https://en.wikipedia.org/wiki/Text_Encoding_Initiative). The problem
with TEI (at least for me) is that it consists of XML, and I hate XML
:-). In this regard, I think that a lightweight markup language as
powerful as Org could be a good alternative to TEI. And Org is indeed
human-readable. One could even think of a possible Org backend for
TEI...

Best regards,

Juan Manuel 


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Create in Org a bilingual book with facing pages
  2022-09-27  9:09 Create in Org a bilingual book with facing pages Juan Manuel Macías
  2022-09-27 12:29 ` Ihor Radchenko
  2022-09-27 16:34 ` Create in Org a bilingual book with facing pages Hendursaga
@ 2022-09-28  7:14 ` Christian Moe
  2 siblings, 0 replies; 17+ messages in thread
From: Christian Moe @ 2022-09-28  7:14 UTC (permalink / raw)
  To: emacs-orgmode

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ías 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’s a sample of two pages from the book:
>
> <https://i.imgur.com/XUOGEnf.png>
>
> 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 (= 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’t 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
> (<https://gitlab.com/maciaschain/org-critical-edition>).
>
> 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:
>
> ┌────
> │ (inserta-pdfpages-bi "resultado.pdf" "\\thispagestyle{plain}" '((2 "\\label{some-label}")))
> └────
>
> The function is evaluated in the master document within a source block:
>
> <https://i.imgur.com/yps6xRA.png>
>
> 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:
>
> <https://i.imgur.com/qbSg2po.png>
>
> 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’s 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
>
> --


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Explicit page breaks (was: Create in Org a bilingual book with facing pages)
  2022-09-28  3:15     ` Ihor Radchenko
@ 2022-09-28  7:50       ` Juan Manuel Macías
  2022-09-29  3:13         ` Ihor Radchenko
  0 siblings, 1 reply; 17+ messages in thread
From: Juan Manuel Macías @ 2022-09-28  7:50 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: orgmode

Ihor Radchenko writes:

>>> 1. \clearpage command, which reminds me about
>>>    https://orgmode.org/list/87mtamjrft.fsf@localhost
>>>    May it be useful to have page break syntax element in Org?
>>
>> I really don't have an opinion at the moment... As a user I try to put
>> as few direct LaTeX commands as possible: commands like \newpage,
>> \pagebreak, \clearpage, \bigskip, \quad, etc. Whenever I can, I
>> prefer to control spaces and page breaks using more general macros. And,
>> when I put these commands, the fact of resorting to an export snippet
>> does not usually bother me, since they are not very verbose commands.
>> But I don't know what other users will think...
>
> Fine-tuning commands should indeed be dedicated to specific export
> backends. It is generally meaningless to have \clearpage in html export.
>
> However, \pagebreak specifically is something people use in plain text
> files, and it may be useful for odt exports.

I agree. In the case of odt its xml is a pain for me to deal with, and
usually I have to open an odt document in Emacs and look at the
contents.xml file to find the (probably) correct tag Between that
hideous labyrinth of tags :-)

Well, considering that the most sensible place (IMO) to introduce an
explicit page break would be before almost anything that isn't a section
(since in sections page breaks should be defined by style), how about
something like this:

#+ATTR_LATEX: :pagebreak \clearpage
#+ATTR_ODT: :pagebreak t
Lorem ipsum dolor sit amet, consectetuer adipiscing elit...

(In the case of LaTeX the expected value of :pagebreak could be any of
several commands that LaTeX has for page breaking (or any other
arbitrary code). And if you put :pagebreak t, the default value would be
\pagebreak.

And to introduce an explicit break before a heading, the above could be
added as a property.

Best regards,

Juan Manuel 


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Create in Org a bilingual book with facing pages
  2022-09-28  6:14   ` Juan Manuel Macías
@ 2022-09-28 14:14     ` Hendursaga
  2022-09-28 15:14       ` Juan Manuel Macías
  0 siblings, 1 reply; 17+ messages in thread
From: Hendursaga @ 2022-09-28 14:14 UTC (permalink / raw)
  To: Juan Manuel Macías; +Cc: orgmode

Juan Manuel Macías <maciaschain@posteo.net> writes:

>> What is the name of this book / the publisher's page? I don't really know Spanish, and only a little Greek, but I'm fascinated by bilingual editions, especially with critical apparati. I've been looking for a workflow for creating my own (possibly critical) bilingual works, but so far, months later, I haven't really found anything satisfactory.
>
> Demóstenes y Esquines, Cartas atribuidas. Publisher: Dykinson.
>
> Perhaps it is not yet in the catalog, because the book is very recent.

Yeah, it doesn't appear to be in the catalog just yet. I'll look for it again sometime later!

> On this page you can see other critical editions (among other books) that I have produced: https://maciaschain.gitlab.io/lunotipia/muestra_trabajos.html. Certainly critical editions are some of the most fascinating kinds of books out there. My favorites are the Oxford Classical Texts, the Budé Collection, and Teubner. In bilingual format the Loeb Classical Texts are also excellent. All these have marked a canon.

I'll look through that page sometime! As for your favorites, I already have some of them on my lists, but I'll look at the others!

> I think that the automatic synchronization of the facing pages of a bilingual editions, either in TeX or in any other software, is a utopia.

I was beginning to think even state-of-the-art isn't sufficient yet :-/

> In the case of TeX/LaTeX, the single-thread TeX limitation is also added. Packages like parallel (or paracol, which is newer) work fine when dealing with simple text. At more complexity they are unusable. And furthermore, in this case text A is a critical edition that needs its own configuration. Parallel or paracol simply don't work here.

Have you done any works that are parallel / bilingual that parallel, paracol, or whatnot would probably be sufficient?  

> You might also want to take a look at ekdosis, a new package for critical editions. It is not as complete as reledmac (for now), but it has some interesting features, such as the possibility of exporting to TEI.

Ah! I had that somewhere in my bookmarks; now that I have more knowledge on TEI, I might take a closer look! I would've thought importing TEI as opposed to exporting would be the easier / better way, though..

> [...] For critical editions (among other text types for Humanities), the standard for storing textual data is TEI (https://en.wikipedia.org/wiki/Text_Encoding_Initiative). The problem with TEI (at least for me) is that it consists of XML, and I hate XML :-). In this regard, I think that a lightweight markup language as powerful as Org could be a good alternative to TEI. And Org is indeed human-readable. One could even think of a possible Org backend for TEI...

I also hate XML, but that's mostly when aiming for 100% compliance. A lot of features I really don't care for, and I really think the namespacing could've been much simpler, but with a superior editor like Emacs or perhaps a specialized one, I'd like to think much of the chore of TEI goes away..

Question: have you looked at other (open-source) typesetting engines besides the TeX family? Like, say, *roff? In some ways, I prefer groff's way to TeX, but it being a much smaller community, with a much smaller ecosystem, gets in the way..

Cheers,
Hendursaga


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Create in Org a bilingual book with facing pages
  2022-09-28 14:14     ` Hendursaga
@ 2022-09-28 15:14       ` Juan Manuel Macías
  0 siblings, 0 replies; 17+ messages in thread
From: Juan Manuel Macías @ 2022-09-28 15:14 UTC (permalink / raw)
  To: Hendursaga; +Cc: orgmode

Hendursaga writes:

> I'll look through that page sometime! As for your favorites, I already
> have some of them on my lists, but I'll look at the others!

There are also the Renaissance editions, especially those by Aldo
Manuzio or Robert Estienne, which are true works of art. One of my free
time projects is trying to reproduce with LuaTeX an edition of Aldo
Manuzio (including the imperfections), but since I have less and less
free time in my life it is a project that is on the dead track
indefinitely :-)

> Have you done any works that are parallel / bilingual that parallel,
> paracol, or whatnot would probably be sufficient?

When I have tried to do something in real production with these packages
I have always had some problem. But I have done many tests with less
complex text and they do not work badly. Especially paracol, which is
based on multicol.

>> [...] For critical editions (among other text types for Humanities),
>> the standard for storing textual data is TEI
>> (https://en.wikipedia.org/wiki/Text_Encoding_Initiative). The
>> problem with TEI (at least for me) is that it consists of XML, and I
>> hate XML :-). In this regard, I think that a lightweight markup
>> language as powerful as Org could be a good alternative to TEI. And
>> Org is indeed human-readable. One could even think of a possible Org
>> backend for TEI...
>
> I also hate XML, but that's mostly when aiming for 100% compliance. A
> lot of features I really don't care for, and I really think the
> namespacing could've been much simpler, but with a superior editor
> like Emacs or perhaps a specialized one, I'd like to think much of the
> chore of TEI goes away..

Yeah, TEI has become, whether we like it or not, the standard for the
transmission of texts in the digital Humanities. Certainly a TEI-mode
for Emacs, or even a TEI backend for Org would be two wonderful things
if they existed. But I imagine it would also be a tremendous job to make
them exist :-)

> Question: have you looked at other (open-source) typesetting engines
> besides the TeX family? Like, say, *roff? In some ways, I prefer
> groff's way to TeX, but it being a much smaller community, with a much
> smaller ecosystem, gets in the way..

I did something with *roff, but it was a long time ago and nothing worth
remembering. I know *roff still has fans, and I remember seeing a
version out there that incorporates TeX's line break algorithms and has
support for opentype features. A kind of TeXroff, from what I
understand.

Most of my "typographical life" has revolved around TeX. But I entered
the world of TeX not through a standard TeX but through Omega, which was
an experimental version of TeX with Unicode support and a lot of very
sophisticated features, some of which not even LuaTeX has now by the
way, LuaTeX has taken a lot of ideas from Omega). Omega was fascinating,
but a horror to use. To install a TrueType font you had to go through a
few processes. Before using exclusively free software, I also used Adobe
Indesign quite a bit, and know it reasonably well. In fact InDesign has
also borrowed a lot from TeX.

Lately there have been some very interesting (and open source) projects
of new typesetting systems based on TeX but more modern. Among them, I
am very attracted to SILE (https://sile-typesetter.org/), and I have
played quite a lot with this system. It is written entirely in Lua and
supports multithreading. But this and other new projects have one major
problem (IMO): LaTeX. Or, rather, the absence of LaTeX. TeX and any
other typesetting system based on it is unusable as such. Its primitives
are a series of basic physical processes on the page. The good news is
that Knuth made TeX extensible (like Emacs) to be used through a
'format'. And LaTeX format, with its vast repertoire of macro packages,
has made TeX usable by a huge range of users. All those macro packages
are a job already done that nobody is going to be willing to do it
again. Therefore, I believe that any new typesetting system that is not
(in some way) compatible with LaTeX will unfortunately be doomed. The
alternative is that something modular and monolithic like ConTeXt might
emerge, but not with the richness and variety (sometimes excessive,
admittedly) of LaTeX.

Best regards,

Juan Manuel 



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Explicit page breaks (was: Create in Org a bilingual book with facing pages)
  2022-09-28  7:50       ` Explicit page breaks (was: Create in Org a bilingual book with facing pages) Juan Manuel Macías
@ 2022-09-29  3:13         ` Ihor Radchenko
  2022-09-29  5:29           ` Explicit page breaks Juan Manuel Macías
  0 siblings, 1 reply; 17+ messages in thread
From: Ihor Radchenko @ 2022-09-29  3:13 UTC (permalink / raw)
  To: Juan Manuel Macías; +Cc: orgmode

Juan Manuel Macías <maciaschain@posteo.net> writes:

> Well, considering that the most sensible place (IMO) to introduce an
> explicit page break would be before almost anything that isn't a section
> (since in sections page breaks should be defined by style), how about
> something like this:
>
> #+ATTR_LATEX: :pagebreak \clearpage
> #+ATTR_ODT: :pagebreak t
> Lorem ipsum dolor sit amet, consectetuer adipiscing elit...
>
> (In the case of LaTeX the expected value of :pagebreak could be any of
> several commands that LaTeX has for page breaking (or any other
> arbitrary code). And if you put :pagebreak t, the default value would be
> \pagebreak.
>
> And to introduce an explicit break before a heading, the above could be
> added as a property.

I do not like this idea.

Do note that page breaks may or may not lay between paragraphs or Org
elements. By its nature, page break is an object (in Org terminology).

I do understand your desire to allow putting page breaks before
headings. However, I think that proliferation of such export options is
a mistake. Instead, we should provide a generic way to define pre/post
text when exporting headings. We do discuss :export_templates in the
other thread, and we may as well define something similar but for
including the normal Org markup. (It should not be a property - I'd
rather have Org markup to be placed directly into the document and not
hidden inside properties drawer).

In any case, I'd rather discuss the question of putting staff prior to
exported heading in the :export_template thread.

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Explicit page breaks
  2022-09-29  3:13         ` Ihor Radchenko
@ 2022-09-29  5:29           ` Juan Manuel Macías
  2022-09-29  6:05             ` Max Nikulin
                               ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Juan Manuel Macías @ 2022-09-29  5:29 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: orgmode

Ihor Radchenko writes:

> Do note that page breaks may or may not lay between paragraphs or Org
> elements. By its nature, page break is an object (in Org terminology).

Indeed, page break can be placed anywhere. But inserting it before
paragraphs, at least in Org, is the least compromised by the
idiosyncrasies of each format: odt or LaTeX. And the most
format-agnostic. And on the other hand, in LaTeX and odt it's also the
safest place to put them, unless you want to add some fine-tuning in
either case.

Why would anyone want to add an explicit page break and interrupt the
natural flow of text on the page? It occurs to me that for two possible
reasons: a) for (let's say) "expressive" reasons, that is, because you
want certain content to start on a new page. And b) out of simple
necessity, to fix something you don't like: carry a line to the next
page, fix an overfull vbox in LaTeX, or a thousand other things.

Cuts by necessity can occur within the paragraph. But cutting a page
within a paragraph is a tricky thing. In libreoffice (and I think in any
word processor) you can place the cursor where you want to cut and press
control + enter. This creates a new page but also creates two
paragraphs, and we only want one paragraph, but with a page break in the
middle. I suppose that a forced line break should be added at the end of
the previous paragraph (and probably produce a very ugly result with
very wide spaces between words). But the section on the next page would
still be a new paragraph for libreoffice.

LaTeX is more refined, but the process and the caveats are the same.
\clearpage adds a new page (and a new paragraph) and terminates the old
one. And \pagebreak simply adds a page break (and the best place to add
it is between two paragraphs, I insist). If you have \flushbottom active
(by default in the book class), with \pagebreak LaTeX will do its best
to match the page height after \pagebreak, inserting the necessary
vertical space before the break. If you want to insert a page break
(\pagebreak) within a paragraph, LaTeX will choose the end of the line
to break. If you want to force the break exactly there, you'll probably
want to put something like \linebreak\par\pagebreak; again, you will now
find yourself with two paragraphs, and you will need to add at least one
\noindent before the second paragraph.

With all this, I mean: to what extent should Org care about all these
details, more related to fine-tuning the output format?

Best regards,

Juan Manuel 


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Explicit page breaks
  2022-09-29  5:29           ` Explicit page breaks Juan Manuel Macías
@ 2022-09-29  6:05             ` Max Nikulin
  2022-09-29  6:21             ` Thomas S. Dye
  2022-10-03  7:14             ` Ihor Radchenko
  2 siblings, 0 replies; 17+ messages in thread
From: Max Nikulin @ 2022-09-29  6:05 UTC (permalink / raw)
  To: emacs-orgmode

Let me remind that the discussion originates from a complain that 
filling paragraph does not respect ^L character in the .org file. The 
topic starter have not provided more details concerning their use case, 
maybe it is irrelevant to export.

During export (LaTeX is not the only case, even HTML may be printed or 
saved as PDF and has some CSS attributes) \clearpage (or its equivalent) 
may be attributed to the end of a block level element or a beginning of 
it. In the latter case it should be preserved even if the previous 
heading is commented out. It resembles to a recent topic discussing 
wrapping exported heading or other elements into some template.

I agree that page breaking inside paragraph (at particular point or when 
current line is filled) is a different case. Degree of support may vary 
across export backends.



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Explicit page breaks
  2022-09-29  5:29           ` Explicit page breaks Juan Manuel Macías
  2022-09-29  6:05             ` Max Nikulin
@ 2022-09-29  6:21             ` Thomas S. Dye
  2022-10-03  7:14             ` Ihor Radchenko
  2 siblings, 0 replies; 17+ messages in thread
From: Thomas S. Dye @ 2022-09-29  6:21 UTC (permalink / raw)
  To: Juan Manuel Macías; +Cc: Ihor Radchenko, emacs-orgmode

Aloha all,

Juan Manuel Macías <maciaschain@posteo.net> writes:

> Ihor Radchenko writes:
>
>> Do note that page breaks may or may not lay between paragraphs 
>> or Org
>> elements. By its nature, page break is an object (in Org 
>> terminology).
>
> Indeed, page break can be placed anywhere. But inserting it 
> before
> paragraphs, at least in Org, is the least compromised by the
> idiosyncrasies of each format: odt or LaTeX. And the most
> format-agnostic. And on the other hand, in LaTeX and odt it's 
> also the
> safest place to put them, unless you want to add some 
> fine-tuning in
> either case.
>

This doesn't reach to paragraphs, but tags do a good job of 
inserting \clearpage and \newpage before a section heading in 
LaTeX export.  

****** Rasmus filter headline tags

This function was improved by Rasmus Pank Roulund based on one I 
had
cobbled together from pieces posted on the Org mode mailing list.

#+name: rpr-filter-headline-tags
#+begin_src emacs-lisp :results silent
(defun tsd-filter-headline-tags (contents backend info)
  "Ignore headlines with tag `ignoreheading' and/or start LaTeX
  section with `newpage' or `clearpage' command."
  (cond ((and (org-export-derived-backend-p backend 'latex)
	      (string-match "\\`.*newpage.*\n" (downcase contents))
	      ;; if you want to get rid of labels use the string
	      ;; "\\`.*ignoreheading.*\n.*\n"
	      (string-match "\\`.*ignoreheading.*\n" (downcase 
	      contents)))
	 (replace-match "\\\\newpage\n" nil nil contents))
	((and (org-export-derived-backend-p backend 'latex)
	      (string-match "\\`.*clearpage.*\n" (downcase contents))
	      (string-match "\\`.*ignoreheading.*\n" (downcase 
	      contents)))
	 (replace-match "\\\\clearpage\n" nil nil contents))
	((and (org-export-derived-backend-p backend 'latex 'html 'ascii)
	      (string-match "\\`.*ignoreheading.*\n" (downcase 
	      contents)))
	 (replace-match "" nil nil contents))
	((and (org-export-derived-backend-p backend 'latex)
	      (string-match 
	      "\\(\\`.*?\\)\\(?:\\\\hfill{}\\)?\\\\textsc{.*?newpage.*?}\\(.*\n\\)"
			    (downcase contents)))
	 (replace-match "\\\\newpage\n\\1\\2"  nil nil contents))
	((and (org-export-derived-backend-p backend 'latex)
	      (string-match 
	      "\\(\\`.*?\\)\\(?:\\\\hfill{}\\)?\\\\textsc{.*?clearpage.*?}\\(.*\n\\)" 
	      (downcase contents)))
	 (replace-match "\\\\clearpage\n\\1\\2"  nil nil contents))))
#+end_src

Hope this helps. If not, sorry for the noise.

All the best,
Tom

-- 
Thomas S. Dye
https://tsdye.online/tsdye


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Explicit page breaks
  2022-09-29  5:29           ` Explicit page breaks Juan Manuel Macías
  2022-09-29  6:05             ` Max Nikulin
  2022-09-29  6:21             ` Thomas S. Dye
@ 2022-10-03  7:14             ` Ihor Radchenko
  2022-10-04 20:24               ` Juan Manuel Macías
  2 siblings, 1 reply; 17+ messages in thread
From: Ihor Radchenko @ 2022-10-03  7:14 UTC (permalink / raw)
  To: Juan Manuel Macías; +Cc: orgmode

Juan Manuel Macías <maciaschain@posteo.net> writes:

> ...
> With all this, I mean: to what extent should Org care about all these
> details, more related to fine-tuning the output format?

Thanks for the detailed explanation!

It is now clear that pagebreak by itself may very much depend on the
specifics of the export backend and the place in the document.

Using page break at the same place for different export backends is
unlikely to be useful.

On the other hand, some backends (odt) are too cumbersome to put page
breaks within @@odt:...@@ export snippets.

What we do want is some way to put a page break just for odt or just for
latex.

May we introduce a new standard macro {{{page-break(backend)}}}
that will expand to an appropriate
@@backend:<whatever is needed to mark new page in the given backend@@
?

WDYT?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Explicit page breaks
  2022-10-03  7:14             ` Ihor Radchenko
@ 2022-10-04 20:24               ` Juan Manuel Macías
  2022-10-05  7:59                 ` Ihor Radchenko
  0 siblings, 1 reply; 17+ messages in thread
From: Juan Manuel Macías @ 2022-10-04 20:24 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: orgmode

Ihor Radchenko writes:

> May we introduce a new standard macro {{{page-break(backend)}}}
> that will expand to an appropriate
> @@backend:<whatever is needed to mark new page in the given backend@@
> ?

The macro seems like a good idea. The only (minor) inconvenience that I
see, if I have understood it correctly, is in the case of LaTeX, where
there are several commands that do different things: \pagebreak,
\clearpage, \newpage, etc.

Since \pagebreak is a more low-level command (introduces a hard break),
it could be left as the default command \clearpage, which starts a new
page and ends the old one. I don't know...

By the way, in LaTeX there is also the opposite of \pagebreak:
\nopagebreak, with a mandatory level from 1 to 4. I see this type of
commands more useful for defining new LaTeX commands than for inserting
them directly into the document.

And, in any case, I think this page break topic is most useful
especially for odt, which only has a hard break (and also splits the
paragraph in two if added inside the paragraph). For LaTeX, after all,
putting things like @@latex:\pagrebreak[2]@@ doesn't involve much
verbosity.

Anyway, the opendocument schema is completely arcane to me. I have taken
a look at the Org Manual and it says that this snippet adds a page break
in odt export:

#+odt:<text:p text:style-name="PageBreak"/>

But I have tried:

foo

#+odt:<text:p text:style-name="PageBreak"/>

bar

and the document is not exported with the page break. I don't know if
I'm missing something. But as i said, XML is beyond me :-).

Best regards,

Juan Manuel 



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Explicit page breaks
  2022-10-04 20:24               ` Juan Manuel Macías
@ 2022-10-05  7:59                 ` Ihor Radchenko
  0 siblings, 0 replies; 17+ messages in thread
From: Ihor Radchenko @ 2022-10-05  7:59 UTC (permalink / raw)
  To: Juan Manuel Macías; +Cc: orgmode

Juan Manuel Macías <maciaschain@posteo.net> writes:

> Ihor Radchenko writes:
>
>> May we introduce a new standard macro {{{page-break(backend)}}}
>> that will expand to an appropriate
>> @@backend:<whatever is needed to mark new page in the given backend@@
>> ?
>
> The macro seems like a good idea. The only (minor) inconvenience that I
> see, if I have understood it correctly, is in the case of LaTeX, where
> there are several commands that do different things: \pagebreak,
> \clearpage, \newpage, etc.
>
> Since \pagebreak is a more low-level command (introduces a hard break),
> it could be left as the default command \clearpage, which starts a new
> page and ends the old one. I don't know...
>
> By the way, in LaTeX there is also the opposite of \pagebreak:
> \nopagebreak, with a mandatory level from 1 to 4. I see this type of
> commands more useful for defining new LaTeX commands than for inserting
> them directly into the document.

Hmm... Then I am wondering about the utility of page break macro outside
odt export.

> And, in any case, I think this page break topic is most useful
> especially for odt, which only has a hard break (and also splits the
> paragraph in two if added inside the paragraph). For LaTeX, after all,
> putting things like @@latex:\pagrebreak[2]@@ doesn't involve much
> verbosity.
>
> Anyway, the opendocument schema is completely arcane to me. I have taken
> a look at the Org Manual and it says that this snippet adds a page break
> in odt export:
>
> #+odt:<text:p text:style-name="PageBreak"/>
>
> But I have tried:
>
> foo
>
> #+odt:<text:p text:style-name="PageBreak"/>
>
> bar
>
> and the document is not exported with the page break. I don't know if
> I'm missing something. But as i said, XML is beyond me :-).

I missed this part of the manual.
If adding page break is this easy, I am not sure if we really need to
bother with macro.

The only thing might be adding the PageBreak style into
etc/styles/OrgOdtStyles.xml, which you likely missed. (see *Hint* in the
manual).

Or we may also add {{{odt-page-break}}} macro for odt specifically.

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2022-10-05  8:02 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-27  9:09 Create in Org a bilingual book with facing pages Juan Manuel Macías
2022-09-27 12:29 ` Ihor Radchenko
2022-09-27 16:50   ` Juan Manuel Macías
2022-09-28  3:15     ` Ihor Radchenko
2022-09-28  7:50       ` Explicit page breaks (was: Create in Org a bilingual book with facing pages) Juan Manuel Macías
2022-09-29  3:13         ` Ihor Radchenko
2022-09-29  5:29           ` Explicit page breaks Juan Manuel Macías
2022-09-29  6:05             ` Max Nikulin
2022-09-29  6:21             ` Thomas S. Dye
2022-10-03  7:14             ` Ihor Radchenko
2022-10-04 20:24               ` Juan Manuel Macías
2022-10-05  7:59                 ` Ihor Radchenko
2022-09-27 16:34 ` Create in Org a bilingual book with facing pages Hendursaga
2022-09-28  6:14   ` Juan Manuel Macías
2022-09-28 14:14     ` Hendursaga
2022-09-28 15:14       ` Juan Manuel Macías
2022-09-28  7:14 ` Christian Moe

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).