From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id cPbLE7/emGCHCgAAgWs5BA (envelope-from ) for ; Mon, 10 May 2021 09:20:31 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id cBphD7/emGDaFgAAbx9fmQ (envelope-from ) for ; Mon, 10 May 2021 07:20:31 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A4D5CEAF1 for ; Mon, 10 May 2021 09:20:30 +0200 (CEST) Received: from localhost ([::1]:50232 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lg0DM-0001C2-F7 for larch@yhetil.org; Mon, 10 May 2021 03:20:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37054) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lg0CX-0001Bt-Aq for emacs-orgmode@gnu.org; Mon, 10 May 2021 03:19:37 -0400 Received: from mout01.posteo.de ([185.67.36.65]:44555) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lg0CQ-0002Vm-C2 for emacs-orgmode@gnu.org; Mon, 10 May 2021 03:19:36 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 9EC71240026 for ; Mon, 10 May 2021 09:19:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1620631166; bh=AKfvRDWnvAQqbkQoz1OEVDJQA3HkSmCN6RgHEki4zkU=; h=From:To:Subject:Date:From; b=ARBUYj1ZT0UzbYO1Cii3bbLCRCrJfY62NvSWm9w2COh0ywbZiiZRpzquqmU5YEmWz GYQatG8G3llUVHH2z68OP2bXD29WFzmQy3O5OmkVQbIEgkqAVwRw9B6gXzwDrK7/kr emf8SQUiSPbGokeTDJoFu1ssoiMWid4Z8Mz3qaX1naOk6397v+7dq9Ujuwv3aD38xG kgv1rjLRFLn1+/vM8qKdx03VKq8yi09/CrBjbdBgHAw9af3idHVIBGwDzhW2/hsZPs aCCaK7V9uqcxUkHcQKXP5vMRXxuP7I/B9TN5sourSiSLPGG3HvaSKFBlWws/ZsTVmt 1bgkYFzhZl7yw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Fdsqy0Zxqz6tm9 for ; Mon, 10 May 2021 09:19:25 +0200 (CEST) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: orgmode Subject: [tip] Export annotations with the 'Mindflow' LaTeX package Date: Mon, 10 May 2021 07:19:25 +0000 Message-ID: <87sg2v6ooy.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=maciaschain@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1620631230; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=3VIfZSRnC8li4OpHkQ4fZxNmY5+Es3nglzYIazYommo=; b=iVsxxInqLuoEFEIvT3DlLJSHJm99Uz2Q+HHpe536zQl93PIoQ1CSioWOr9EiYWzoYzd3Rc H+JYYSmf9KwqZbN1iCvzMKKtKc4F/pZoyjSCpJrmu3y0ulMkG9OqTVXR5/VE0ZxutGHXoJ yNZ3s3sDAcVvrxJKmsryEmQefjMhDpLpfgq5O7vHX8QfgOgI/Lw0JVA99bWfQsF1WXijV3 TBpcwtSoCjT9y4ltPis+ZPW2D2LB4/oxlNQxK+z3FRGaA7GwxC7XTPX+clO2hoycjhIjFL /xwWT6F4J3mLPr8DNl3HKE4hpZMUXtX4MJTjgfelHmswJnbtsUgRcsCl9/6Sog== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1620631230; a=rsa-sha256; cv=none; b=aLdNXBx2alsMw7xULv5CEsyGwE29CE099AAaAIIFepL5KiWLFy/S0brBWhG5g4J/5IPAIW j3eDt8OBZhSnliJ98CWwmUV01hMxyHGbtfvArlFqhtTr8TzWkk2Y5FDMsorQdKYU+BVnLc GA+rsn2hFHyN0xGN7zGK9YmWre51Q7b+6AeKKfTAq+X0a9rUW5eGfj+Ik+IczKEvf6s13+ WYRjoOtCpCrbA09m32QcFUsD0L1tTjM1sddr4self6KVjIDqthFLMENj9QyoW64GhBsWDg GcNeNJIXFJRphftrp97CnTrX2EEY62CgszlMYY9Ob2/eZdXVn5tx7SgyNZlCnQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=ARBUYj1Z; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -3.15 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=ARBUYj1Z; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: A4D5CEAF1 X-Spam-Score: -3.15 X-Migadu-Scanner: scn0.migadu.com X-TUID: ZbXlwZWpyJr7 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/