Re: Verse block and separations (was: [bug] `org-latex-line-break-safe' breaks the export of verse blocks to LaTeX)

2022-10-19 Thread Max Nikulin
On 16/10/2022 23:33, Juan Manuel Macías wrote: (replace-regexp-in-string "^[ \t]+" (lambda (m) (format "\\hspace*{%dem}" (length m))) (replace-regexp-in-string "\\(\n\\)+\\([ \t]*\\)+" "\n"

Re: Verse block and separations (was: [bug] `org-latex-line-break-safe' breaks the export of verse blocks to LaTeX)

2022-10-17 Thread Max Nikulin
On 16/10/2022 23:33, Juan Manuel Macías wrote: Max Nikulin writes: I am surprised that \vspace is added instead of empty line between stanzas. First of all, I'm afraid that in my previous post I mixed up two different issues: the verse block bug and my personal opinions about the new added

Re: Line breaks and brackets in LaTeX export (was: [bug] `org-latex-line-break-safe' breaks the export of verse blocks to LaTeX)

2022-10-17 Thread Ihor Radchenko
Juan Manuel Macías writes: > The solution of adding \relax or \empty is a good one. The problem is > when it is applied massively and indiscriminately, bearing in mind that > it is to prevent a problem that is, frankly, very rare. \empty is > unlikely to have any side effects, but still, I don't

Re: Verse block and separations (was: [bug] `org-latex-line-break-safe' breaks the export of verse blocks to LaTeX)

2022-10-17 Thread Ihor Radchenko
Juan Manuel Macías writes: > Yes, you're right: that \vspace is the normal behavior of the block when > exporting to LaTeX, and it is certainly not quite correct. In LaTeX, > both the out-of-the-box verse environment and the one provided by the > 'verse' package (which, typographically speaking,

Line breaks and brackets in LaTeX export (was: [bug] `org-latex-line-break-safe' breaks the export of verse blocks to LaTeX)

2022-10-16 Thread Juan Manuel Macías
Max Nikulin writes: > In my opinion Org has to apply a general solution merely because a table > may be result of evaluation of an org-babel code block. I may be wrong, > but I suspect that some users do not care what is the intermediate > format when they need a PDF file. > >> And finally, I

Verse block and separations (was: [bug] `org-latex-line-break-safe' breaks the export of verse blocks to LaTeX)

2022-10-16 Thread Juan Manuel Macías
Max Nikulin writes: > The following is irrelevant to the recent changes. I have tried > > >8 > text > > #+begin_verse > > a b > c d > > e f > g h > #+end_verse > > 8< > > With the fix Ihor committed today I have got > > >8 > text > \begin{verse} > \vspace*{1em} > a

Re: [bug] `org-latex-line-break-safe' breaks the export of verse blocks to LaTeX

2022-10-16 Thread Max Nikulin
On 16/10/2022 04:35, Juan Manuel Macías wrote: To begin with, it is a particular solution applied in a general way. This can have unexpected consequences, as has happened in verse blocks. In my opinion Org has to apply a general solution merely because a table may be result of evaluation of

Re: [bug] `org-latex-line-break-safe' breaks the export of verse blocks to LaTeX

2022-10-16 Thread Juan Manuel Macías
Ihor Radchenko writes: >> And finally, I think that applying a general solution to this problem is >> something that should be done(IMHO) in LaTeX and not in Org, for >> example, with some new package that would protect certain signs or >> through ad hoc LaTeX/Lua code. > > Either way, we will

Re: [bug] `org-latex-line-break-safe' breaks the export of verse blocks to LaTeX

2022-10-15 Thread Ihor Radchenko
Juan Manuel Macías writes: > The recent addition of the `org-latex-line-break-safe' constant makes it > impossible to compile verse blocks. The reason is that now a \\ is > inserted between each stanza (aka each paragraph), instead of the > `\vspace{1em}' as before. That's wrong, as this compile

[bug] `org-latex-line-break-safe' breaks the export of verse blocks to LaTeX

2022-10-15 Thread Juan Manuel Macías
The recent addition of the `org-latex-line-break-safe' constant makes it impossible to compile verse blocks. The reason is that now a \\ is inserted between each stanza (aka each paragraph), instead of the `\vspace{1em}' as before. That's wrong, as this compile error message says: - A