Posted By

tprimke on 06/28/10


Tagged

newLISPwiki


Versions (?)

Adds anchor to found heading


 / Published in: Lisp
 

  1. ;; returns an anchored content for TOC, if needed
  2. ;; this function also updates the anchor number
  3. (define (get-anchor content level)
  4. (if (> level SETUP:toc-level)
  5. content
  6. (let ( str (append {[TOC]<a name="a} (string TOC:anchor) {" href="#toc">[TOC]} content {[TOC]</a>[TOC]}) )
  7. (++ TOC:anchor)
  8. str)))

Report this snippet  

You need to login to post a comment.