From: "Fraga, Eric" <e.fraga@ucl.ac.uk>
To: "Alain.Cochard@unistra.fr" <Alain.Cochard@unistra.fr>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: How to move from inline tasks to drawers? [was: How to change the width of a latex exported inlinetask?]
Date: Sun, 3 Nov 2019 13:50:26 +0000 [thread overview]
Message-ID: <871rupax29.fsf@ucl.ac.uk> (raw)
In-Reply-To: <23997.32316.900106.897373@frac.u-strasbg.fr> (Alain Cochard's message of "Sat, 2 Nov 2019 14:01:48 +0100")
On Saturday, 2 Nov 2019 at 14:01, Alain.Cochard@unistra.fr wrote:
> You also said that you had "already moved to using drawers for a large
> number of [your] inline task use cases, the ones that weren't really
> tasks!". Is this consistent with your "almost completely" above?
> This leads me to the question of what precisely _defines_ a "task";
Good question! I guess, for me, a task is one that will appear in my
agenda so has a TODO state (possibly) and/or scheduling/deadline
information. But the distinction is rather blurry.
So, in fact, when I am working on a long document, I have tasks of the
"must improve this section" type which are not tasks for scheduling (the
whole document is itself a task) or "notes" for processing later (by
myself or by others involved in the same document). I use drawers for
these types of activities. I then use the export formatting options to
make the pseudo-tasks and notes appear differently in the exported
output, whether for sharing or for printing/display. So, for instance,
I look for ":todo:" and ":note:" drawers.
If the document I am working on is a coursework or test, I use drawers
for storing the solutions, e.g. a drawer called ":solution:"! For this,
for instance, I have the following elisp in the document that is invoked
when I open the document:
#+begin_src emacs-lisp
(setq-local org-latex-format-drawer-function
(lambda (name contents)
(cond ((string= name "solution")
(format "\\begin{mdframed}\\paragraph{Solution.} %s\\end{mdframed}" contents))
(t (format "\\textbf{%s}: %s" name contents))
)))
#+end_src
together with
#+latex_header: \usepackage[backgroundcolor=yellow!10!white]{mdframed}
to make the solution stand out clearly.
The nice thing about drawers is I can turn them on or off for exporting
via the "d:" document option:
HTH,
eric
--
Eric S Fraga via Emacs 27.0.50, Org release_9.2.6-552-g8c5a78
next prev parent reply other threads:[~2019-11-03 13:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-02 13:01 How to move from inline tasks to drawers? [was: How to change the width of a latex exported inlinetask?] Alain.Cochard
2019-11-03 13:50 ` Fraga, Eric [this message]
2019-11-04 20:14 ` John Kitchin
2019-11-04 20:30 ` Samuel Wales
2019-11-05 8:59 ` Fraga, Eric
2019-11-05 12:49 ` John Kitchin
2019-11-05 13:07 ` Fraga, Eric
2019-11-05 13:28 ` John Kitchin
2019-11-05 13:45 ` Fraga, Eric
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=871rupax29.fsf@ucl.ac.uk \
--to=e.fraga@ucl.ac.uk \
--cc=Alain.Cochard@unistra.fr \
--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).