-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
66 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
(require 'ox-typst) | ||
|
||
(setq org-export-with-toc nil) | ||
|
||
(org-export-define-backend 'typst-slide | ||
'((export-block . org-typst-export-block) | ||
(headline . org-typst-headline) | ||
(item . org-typst-item) | ||
(keyword . org-typst-keyword) | ||
(section . org-typst-section) | ||
(src-block . org-typst-src-block)) | ||
:menu-entry | ||
'(?y "Export to Typst" | ||
((?F "As Typst buffer" org-typst-export-as-typst) | ||
(?f "As Typst file" org-typst-export-to-typst) | ||
(?p "As PDF file" org-typst-export-to-pdf))) | ||
:options-alist | ||
'((:typst-format-drawer-function nil nil #'(lambda (_ contents) contents)) | ||
(:typst-format-inlinetask-function nil | ||
nil | ||
#'(lambda (_ contents) contents)))) | ||
|
||
(defun org-typst-slide-export-as-typst (&optional async subtreep visible-only body-only ext-plist) | ||
(interactive) | ||
(org-export-to-buffer 'typst-slide "*Org Typst Slide Export*" | ||
async subtreep visible-only body-only ext-plist)) | ||
|
||
(defun org-typst-slide-export-to-typst (&optional async subtreep visible-only body-only ext-plist) | ||
(interactive) | ||
(let ((outfile (org-export-output-file-name ".typ" subtreep))) | ||
(org-export-to-file 'typst-slide outfile | ||
async subtreep visible-only body-only ext-plist))) |
File renamed without changes.