Регистрация | Войти
Lisp — программируемый язык программирования

Песочница

тест

Большой не зелёный текст, который (не) должен быть в одну строку.

(defun hello () 
  (print "Hello world")
)

А этот абзац уже должен быть разделён.

А эта ссылка ведет на Гугль

Но докувики почему-то долго не хотел переносить ее на новую строку

Заголовок 3 уровня

Заголовок 4 уровня

Заголовок 5 уровня

Еще один заголовок

index a7b914a..277e811 100644
--- a/src/dokuwiki/render-pdf.lisp
+++ b/src/dokuwiki/render-pdf.lisp
@@ -18,14 +18,14 @@

 (defmacro deffont (name string-name)
   `(defparameter ,name
-     (pdf:get-font (pdf:font-name (pdf:load-ttf-file (merge-pathnames (format nil
+     (pdf:get-font (pdf:font-name (pdf:load-ttf-font (merge-pathnames (format nil
                                                                               "~A.ttf"
                                                                               ,string-name
)

                                                                       *cm-fonts-dir*
)
)
)
)
)
)


 (defmacro defcorefont (name string-name)
   `(defparameter ,name
-     (pdf:get-font (pdf:font-name (pdf:load-ttf-file (merge-pathnames (format nil
+     (pdf:get-font (pdf:font-name (pdf:load-ttf-font (merge-pathnames (format nil
                                                                               "~A.ttf"
                                                                               ,string-name
)

                                                                       *corefonts-dir*
)
)
)
)
)
)

@@ -93,15 +93,24 @@
             (let ((res (find-outline-by-ref ref item)))
               (finding res such-that res)
)
)
)
)


+(defun append-child-outline (parent title ref-name)
+  (let ((child (make-instance 'outline
+                              :title title
+                              :reference (pdf:get-named-reference ref-name)
)
)
)

+    (setf (pdf::sub-levels parent)
+          (nconc (pdf::sub-levels parent)
+                 (list child)
)
)

+    child
)
)

+
 (defmethod tt::stroke ((header chapter-header) x y)
   (let ((parent-ref (slot-value header 'parent)))
-    (pdf:append-child-outline (or (and parent-ref
-                                       (find-outline-by-ref (pdf::get-named-reference parent-ref)
-                                                            (pdf:outline-root pdf:*document*)
)
)

-                                  (pdf:outline-root pdf:*document*)
)

-                              (slot-value header 'title)
-                              (pdf::register-named-reference (vector pdf:*page* "/FitH" y)
-                                                             (slot-value header 'title)
)
)
)
)

+    (append-child-outline (or (and parent-ref
+                                  (find-outline-by-ref (pdf::get-named-reference parent-ref)
+                                                       (pdf::outline-root pdf:*document*)
)
)

+                             (pdf::outline-root pdf:*document*)
)

+                         (slot-value header 'title)
+                         (pdf::register-named-reference (vector pdf:*page* "/FitH" y)
+                                                        (slot-value header 'title)
)
)
)
)


 (define-wiki-pdf-render dokuwiki:chapter (items)
   (let ((name (second (first items))))
@@ -337,4 +346,4 @@

 (define-wiki-pdf-render dokuwiki:table-cell (items)
   (pdf-render-table-cell items nil)
)

-
\ No newline at end of file
+
diff --git a/src/pcl.lisp b/src/pcl.lisp
index 439b305..074209b 100644
--- a/src/pcl.lisp
+++ b/src/pcl.lisp
@@ -215,7 +215,7 @@
 (defun make-pcl-pdf (&optional (out #P"/tmp/pcl.pdf"))
   (let ((page-number 1))
     (tt:with-document (:mode :outlines)
-      (pdf:append-child-outline (pdf:outline-root pdf:*document*)
+      (rulisp::append-child-outline (pdf::outline-root pdf:*document*)
                                 "Practical Common Lisp"
                                 (let ((pdf:*page* (pcl-first-page)))
                                   (pdf:register-page-reference "Practical Common Lisp")
)
)

8-O

/**
* The HelloWorldApp class implements an application that
* simply displays "Hello World!" to the standard output.
*/
class HelloWorldApp {
   public static void main(String[] args) {
       System.out.println("Hello World!"); //Display the string.
   }
}

@2009-2013 lisper.ru