This is my simple C source code in org-mode.
#+name: hello_one.c
#+begin_src C :noweb tangle :tangle hello_one.c
#include <stdio.h>
int main()
{
printf("Hello, world!\n");
reurn 0;
}
#+end_src
Maybe I can break this whole thing into many blocks.
#+name:hello.c
#+begin_src C :noweb tangle :tangle hello.c
<<include>>
<<main>>
#+end_src
#+name: include
#+begin_src C
#include <stdio.h>
#+end_src
#+name: main
#+begin_src C
int main()
{
printf("Hello, world!\n");
reurn 0;
}
#+end_src
I can successfully tangle it into a source code 'hello.c' and I can successfully weave it into a html document. But I'd like to have a HTML anchor as you many see in LiteratePrograms wiki. One example is the article on Fibonacci Numbers.
As you can see in this page, you can click each chunk name (for example, 'includes', 'fib', 'fastfib' and 'main.) and that brings you to that chunk description.
And each chunk description has its name displayed at the beginning. For example, if you hit the anchor 'fib' in LiteratePrograms article on Fibonacci numbers, it brings you the chunk description and that chunk begins with the chunk name 'fib'.
Is there any way I can implement these two features?