From: gerard.vermeulen@posteo.net
To: Emacs orgmode <emacs-orgmode@gnu.org>,
Ihor Radchenko <yantar92@posteo.net>
Subject: [BUG]: contradictory requirements between resolving links and noweb result block
Date: Fri, 02 Feb 2024 17:43:31 +0000 [thread overview]
Message-ID: <8712e7846134587a2021593191c5f393@posteo.net> (raw)
Hi,
I want to have a kind of dynamic RESULTS: noweb block to select what
other block to put in the LaTeX preamble on LaTeX export.
I can get it working, but in this case links to the RESULTS: noweb block
are not resolved. I found no way to get the links resolved without
breaking Noweb. See my MWE with instructions below:
--- begin Org file ---
# -*- org-latex-prefer-user-labels: t -*- for easier understanding
Listing [[noop]], [[make-noweb]], and [[make-noweb-result]].
#+caption: NOOP
#+name: noop
#+begin_src latex :exports code
% I want to be in the LaTeX preamble above \author{}.
#+end_src
BUG: contradictory requirements for listing [[make-noweb-result]]:
1. Noweb works only in case [[make-noweb]] wraps [[make-noweb-result]]
with
*:exports both*.
2. Resolving links works only in case [[make-noweb]] wraps
[[make-noweb-result]] with *:exports code*.
#+caption: Change after 1st :exports "both" to "code" and vice versa.
#+caption: Execute this block after changing, but before LaTeX export.
#+header: :wrap "src latex -n :exports both :noweb yes :results raw"
#+name: make-noweb
#+begin_src emacs-lisp :exports both :eval no-export
"#+latex_header: <<noop>>"
#+end_src
#+caption: I try to put listing [[noop]] body in the LaTeX preamble.
#+name: make-noweb-result
#+RESULTS: make-noweb
#+begin_src latex -n :exports both :noweb yes :results raw
,#+latex_header: <<noop>>
#+end_src
--- end Org file ---
I realize that this way of doing is contrived.
What I like about it, is that the [[make-noweb-results]] is directly
visible. I can probably also modify `org-latex-packages-alist' but
that is less visible.
Regards -- Gerard
next reply other threads:[~2024-02-02 17:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-02 17:43 gerard.vermeulen [this message]
2024-02-02 20:12 ` [BUG]: contradictory requirements between resolving links and noweb result block Ihor Radchenko
2024-02-04 11:02 ` gerard.vermeulen
2024-02-05 12:32 ` 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=8712e7846134587a2021593191c5f393@posteo.net \
--to=gerard.vermeulen@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).