From: "Juan Manuel Macías" <maciaschain@posteo.net>
To: orgmode <emacs-orgmode@gnu.org>
Subject: [tip] Export annotations with the 'Mindflow' LaTeX package
Date: Mon, 10 May 2021 07:19:25 +0000 [thread overview]
Message-ID: <87sg2v6ooy.fsf@posteo.net> (raw)
Hi all,
A new LaTeX package, mindflow, has recently been uploaded to CTAN
(https://www.ctan.org/pkg/mindflow), which I found interesting and
useful for my org workflow. With this package we can add annotations and
ideas to our document. I mean, all that is in a `mindflow'
environment (including entire sections) will appear as in a kind of
'draft mode', with different format and colour. There is a global option
that allows you to choose between showing or not showing those
annotations.
I think it can be useful (for example) to export custom Org drawers to
that environment. But it also occurred to me to write the following, to
export a entire tree as a `mindflow' environment, with the tag
`:annotation:'
#+begin_src emacs-lisp
(defun my-org-add-mindflow-env-heading (backend)
(when (eq backend 'latex)
(org-show-all)
(save-excursion
(goto-char (point-min))
(while (re-search-forward org-heading-regexp nil t)
(let ((element (org-element-at-point)))
(when (member "annotation" (org-element-property :tags element))
(save-restriction
(org-narrow-to-subtree)
(save-excursion
(goto-char (point-min))
(insert "\n\n@@latex:\\begin{mindflow}@@\n\n")
(goto-char (point-max))
(insert "\n\n@@latex:\\end{mindflow}@@\n\n")))))))))
(add-hook 'org-export-before-processing-hook #'my-org-add-mindflow-env-heading)
#+end_src
Here are some screenshots: https://imgur.com/a/jo320AI
Best regards,
Juan Manuel
https://juanmanuelmacias.com/
reply other threads:[~2021-05-10 7:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sg2v6ooy.fsf@posteo.net \
--to=maciaschain@posteo.net \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).