Ihor Radchenko <yanta...@posteo.net> writes: >> Please, revert this patch. Default environment for #+begin_example is >> verbatim. With this patch the following PDF is generated >> >> \label{org9283054} >> code >> >> for >> >> #+name: test >> #+begin_example >> code >> #+end_example >> >> It is the reason why \label must be outside. I do not remember if line >> break penalty helps after \label. > > Oops. You are indeed right. > Reverted.
Hugo, you may consider writing an alternative patch that only puts label inside for the environments where we know that it is safe. -- 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>