t...@tsdye.com (Thomas S. Dye) writes: > Hi Seb, > > "Sebastien Vauban" <wxhgmqzgw...@spammotel.com> writes: > >> Hi Thomas, >> >> Thomas S. Dye wrote: >>> Is there a difference between :noweb tangle and :noweb no? >> >> Yes: ":noweb no" is the default, and must *not expand* anything. >> >>> Based on the documentation and some limited testing, I made the following >>> table. >>> >>> *** :noweb parameters >>> >>> | param | eval | tangle | export | >>> |--------+------+--------+--------| >>> | yes | + | + | + | >>> | no | - | + | - | >> >> It should be "-", "-", "-" here, if "-" means "no expansion". >> > > Hmm, the manual entry for :noweb no says "However, noweb references will > still be expanded during tangling." You're right, though, :noweb no > doesn't expand noweb references during tangling. I'll work up a manual > patch. >
Great, I'll apply your documentation patch. > > >>> | tangle | - | + | - | >>> |--------+------+--------+--------| >>> | need | + | + | - | >>> What should the name for such an option be? >>> >>> I think it might be good to have a parameter that expands noweb >>>references on evaluation and tangling, but leaves them alone during >>>export. This way the code block would be fully functional, but >>>wouldn't duplicate code during export (when the noweb references are >>>to other code blocks in the same document). >> >> I'd find that interesting as well, but then the names of the code blocks must >> be visible again (in HTML and PDF exports), something that has disappeared >> over time. > > Alternatively for LaTeX, some way to wrap exported code blocks in a > \begin{listing} ... \end{listing} environment, complete with caption and > label. This way the code block name could appear in the caption, and > with \listoflistings, in the document frontmatter as well. > As I recall this was originally implemented and then later removed because it was causing more confusion and problems than it was worth. I hope it hasn't crossed the line of existence more than once. At some point it should be placed behind a user-customizable variable, preferably something like `org-babel-export-code-format' which defaults to something like "%code" but could be augmented to something like "Block Name: *%name*\n %code". It is not immediately clear if such a variable should have different values for different export backends or (likely preferable) should expand into Org-mode text *before* export. Cheers, > >> >> Find attached the 2 PDF I had written (in 2009) for comparing NoWeb's >> rendering of blocks and Babel's rendering. See >> http://lists.gnu.org/archive/html/emacs-orgmode/2009-12/msg00170.html. >> >> Some time after that, we had block names in the HTML/PDF output, but not >> anymore. >> >> Best regards, >> Seb > > All the best, > Tom -- Eric Schulte http://cs.unm.edu/~eschulte/