emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Juan Manuel Macías" <maciaschain@posteo.net>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: orgmode <emacs-orgmode@gnu.org>
Subject: Re: [patch] ox-latex.el: fix blank lines behavior in verse block
Date: Tue, 15 Aug 2023 11:50:13 +0000	[thread overview]
Message-ID: <87edk4jzii.fsf@posteo.net> (raw)
In-Reply-To: <87r0o4ipms.fsf@localhost> (Ihor Radchenko's message of "Tue, 15 Aug 2023 10:08:59 +0000")

Ihor Radchenko writes:

> Thanks!
> I tested the patch with
>
> #+attr_latex:  :literal t
>
> #+begin_verse
>
>  This is just           a test.
>       ASF. 
>    
> #+end_verse
>
>
> and then with
>
> #+attr_latex:  :literal t
>
> #+begin_verse
>
>  This is just           a test.
>
>       ASF. 
>    
> #+end_verse
>
> The output is not different, which it should be, AFAIU. Am I missing something?

I have tried your examples and I think both give the expected result.
Look at this screenshot:

https://i.imgur.com/ofl8Z9f.png

Note one important thing: the only horizontal spaces that are exported
"literally" (ie with \hspace...) are the ones at the beginning of the
line. This is the same as the old behavior, and works with both :literal
and the verse environment. Spaces between words are not exported. Well,
they are exported, but not as \hspace, so LaTeX resolves one or more
space to a single space. It could be an interesting feature that spaces
between words are also preserved, but none of the other backends do
that... Actually the :literal attribute has effect only on blank lines.

(Anyway, I think that without exporting the spaces between words, the
:literal attribute is a bit incomplete. But if those spaces are
exported, it would break compatibility with the other backends. The
horizontal space before the line makes sense for verses, because these
can often be indented arbitrarily in a poem. The other possibility is
that the :literal attribute also exports to a verse environment. In that
case, it would not break compatibility [the verse block in LaTeX would
just have two "modes": one more coherent with the syntax of the verse
environment and another one more similar to the behavior of the rest of
the backends and the "old" verse block behavior in LaTeX export]).

-- 
Juan Manuel Macías

https://juanmanuelmacias.com

https://lunotipia.juanmanuelmacias.com

https://gnutas.juanmanuelmacias.com


  reply	other threads:[~2023-08-15 11:51 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-06 12:03 [patch] ox-latex.el: fix blank lines behavior in verse block Juan Manuel Macías
2023-08-07 11:40 ` Ihor Radchenko
2023-08-07 17:23   ` Juan Manuel Macías
2023-08-09  7:57     ` Ihor Radchenko
2023-08-09  8:41       ` Juan Manuel Macías
2023-08-10  9:27         ` Ihor Radchenko
2023-08-10 10:39           ` Juan Manuel Macías
2023-08-11 10:00             ` Ihor Radchenko
2023-08-11 18:52               ` Juan Manuel Macías
2023-08-12  7:56                 ` Ihor Radchenko
2023-08-12 11:28                   ` Juan Manuel Macías
2023-08-13  8:06                     ` Ihor Radchenko
2023-08-14 20:10                   ` Juan Manuel Macías
2023-08-15 10:08                     ` Ihor Radchenko
2023-08-15 11:50                       ` Juan Manuel Macías [this message]
2023-08-15 11:53                         ` Ihor Radchenko
2023-08-15 14:25                           ` Juan Manuel Macías
2023-08-16  8:10                             ` Ihor Radchenko
2023-08-16 14:10                               ` Juan Manuel Macías
2023-08-17 10:35                                 ` Ihor Radchenko
2023-08-17 20:17                                   ` Juan Manuel Macías
2023-08-18  8:44                                     ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87edk4jzii.fsf@posteo.net \
    --to=maciaschain@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).