Skip to content

Commit

Permalink
[29_11] Pure format on tm-print.scm
Browse files Browse the repository at this point in the history
  • Loading branch information
da-liii authored Oct 7, 2024
1 parent ee059f3 commit 59a5053
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions TeXmacs/progs/texmacs/texmacs/tm-print.scm
Original file line number Diff line number Diff line change
Expand Up @@ -115,18 +115,18 @@
(switch-to-buffer cur)
(buffer-close buf))
(begin
(print-to-file fname)
(unless (attach-doc-to-exported-pdf fname)
(print-to-file fname)
(unless (attach-doc-to-exported-pdf fname)
(notify-now "Fail to attach tm to pdf")))))

(tm-define (attach-doc-to-exported-pdf fname)
(let* ((tem-url (buffer-new))
(new-url (url-relative tem-url (string-append (url-basename fname) ".tm")))
(cur-url (current-buffer-url))
(cur-tree (buffer-get cur-url))
(linked-file (pdf-get-linked-file-paths cur-tree cur-url))
(linked-file-with-main (array-url-append new-url linked-file))
(new-tree (pdf-replace-linked-path cur-tree cur-url)))
(new-url (url-relative tem-url (string-append (url-basename fname) ".tm")))
(cur-url (current-buffer-url))
(cur-tree (buffer-get cur-url))
(linked-file (pdf-get-linked-file-paths cur-tree cur-url))
(linked-file-with-main (array-url-append new-url linked-file))
(new-tree (pdf-replace-linked-path cur-tree cur-url)))
(buffer-rename tem-url new-url)
(buffer-copy cur-url new-url)
(buffer-save new-url)
Expand Down

0 comments on commit 59a5053

Please sign in to comment.