the readme is currently out of date and doesnt yet document all features.
- 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
:mogrify
command should be available.gunzip
andgzip
commandsxournalpp
- support
org-insert-link
- support
:preview
link parameter if org >v9.7 - option to keep background grid in extracted images
- integration with pdf-tools (browse your .xopp file as a pdf in emacs)
- have emacs functions to copy images or latex previews into clipboard so that they can be pasted in xournalpp
- process queue to avoid running too many subprocesses at once (which might happen in some cases if we’re trying to extract too many images)