alhassy / alhassy/org-special-block-extras

Unwanted newlines in LaTeX export

Open
#27 4 comments 0 reactions 0 assignees View on GitHub
documentation
Dominant language
HTML
Stars
236
Forks
17
PR merge metrics
No merged PRs in 30d

Description

Consider the following custom block:

```
#+begin_blockquote :citekey key :pages pages
*This* is a /try/.
#+end_blockquote
```
which was defined like this

```
(org-defblock blockquote nil (citekey "" pages "") "This is just an attempt."
(format (if (equal backend 'latex)
"\\blockcquote[%s]{%s}{%s}" nil)
pages citekey contents))
```

What it should print:

```
\blockcquote[pages]{key}{\textbf{This} is a \emph{try}.}
```

What it does print:

```
\blockcquote[pages]{key}{
\textbf{This} is a \emph{try}.

}
```
The problem is that, due to the added whitespace, the custom block just shown produces the latter output. If this is exported to LaTeX, instead of `"**This** is a _try_"`, you get `" **This** is a _try_ "`. regexp-replacement does not work here, adding `%` only for the first line. Any ideas what to do?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.