- invoke
org-xopp-new-figure
and choose a name for the new .xopp file - a link will be inserted in org mode, hit save (in org)
- draw something in the
xournalpp
window that opens, then hit save in xournalpp - reload org file (kill/reopen or using
find-file
) - the figure you drew will be inserted in the org document without the background (transparent and trimmed with background removed).
using elpaca
:
(use-package org-xopp
:after (org)
:ensure ( :host github :repo "mahmoodsh36/org-xopp" :files (:defaults "*.sh"))
:config
(org-xopp-setup))
using straight
:
(straight-use-package
'(org-xopp :type git :host github :repo "mahmoodsh36/org-xopp" :files (:defaults "*.sh")))
(with-eval-after-load 'org
(require 'org-xopp)
(org-xopp-setup))
- two org links are defined,
xopp-figure
andxopp-pages
, the first is used for figures (single-page drawings) and will be extracted and previewed in org, the latter is embedded in the pdf exports as part of the document (without extracting figures). - xournalpp pages are embedded into org’s pdf/latex exports
- images are rendered asynchronously so they dont affect org-mode’s startup time
imagemagick
:convert
command should be available.xournalpp
- only regenerate pdf/image files if the corresponding .xopp files have changed
- handle edge cases (errors in image generation, etc)
- live sync of figures (automatically display changes in org every time a linked .xopp file is modified)
- more customization options
- implement image centering (the behavior in the picture is from my config and depends on functionality from the
dev
branch oforg-mode
)