Johan Sandblom writes:
> However, tangling this apparently first sorts the chunks according to 
> mode, so the resulting file first contains all the html, then the css, 
> javascript and php in order

Hi,

Try naming the chunks (any name will do), and add a block pulling them
all together with noweb syntax.

#+NAME: header
#+BEGIN_SRC nxml
!<!DOCTYPE html>
<!-- header and stuff -->
#+END_SRC

#+NAME: styles
#+BEGIN_SRC css
/* inline CSS */
#+END_SRC

#+NAME: scripts
#+BEGIN_SRC javascript
// javascript
#+END_SRC

#+NAME: body1
#+BEGIN_SRC nxml
<!-- more html -->
#+END_SRC

#+NAME: body2
#+BEGIN_SRC nxml
<!-- even more html -->
#+END_SRC

#+NAME: fulldoc
#+BEGIN_SRC nxml :tangle test-tangle.php :noweb yes
  <<header>>
  <<styles>>
  <<scripts>>
  <<body1>>
  <<body2>>
#+end_src

Yours,
Christian

Reply via email to