emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[BUG]: contradictory requirements between resolving links and noweb resu


From: gerard . vermeulen
Subject: [BUG]: contradictory requirements between resolving links and noweb result block
Date: Fri, 02 Feb 2024 17:43:31 +0000

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]