1

I maintain an org file to organize my literature survey. The headline structure reflects the hierarchy of topics in my research area. Within each topic, there is a list of research articles. A TODO sequence helps me recall how deeply I have studied each article.

The problem is that, to use the TODO sequence, I need to have a headline for each article. During the export to latex, this results in a section created for each article, whereas I want to have a numbered list of articles within each topic. Setting org-export-headline-levels does not solve the problem, since topics can be nested a various levels.

Thus, it seems that I am looking to somehow associate TODO sequence with items rather than headlines. Is this possible? If not, is there an idiomatic solution to my problem?

2

This can be achieved using inline tasks. The basic approach is described in this entry in the Org FAQ. Here is an example:

#+OPTIONS: inline:nil num:nil toc:nil p:nil
#+SEQ_TODO: TO-READ STARTED | FINISHED 
#+SEQ_TODO: | ABANDONED
* List of papers
** First topic
1. First paper: a comment I want to be exported
*************** TO-READ 
A private comment, which won't be exported
*************** END

2. Second paper
*************** STARTED 
*************** END

3. Third paper
*************** FINISHED 
CLOSED: [2017-07-28 Fri 17:18]
*************** END

** Second topic
1. Second topic paper
*************** ABANDONED 
CLOSED: [2017-07-28 Fri 17:17]
*************** END

2. Another second topic paper

This exports via LaTeX to PDF (C-c C-e l o) as

Screenshot of LaTeX export output

To set this up, you need the following in your config file:

(require 'org-inlinetask)
(setq org-inlinetask-default-state "TO-READ")

Then, you can add an inline task with C-c C-x t, which will start in the TO-READ state.

If you ever do want all the metadata to be exported, you can just you edit the OPTIONS to inline:t p:t, which gives

Result of exporting metadata too

  • Nice! I am wondering whether another approach exists. For example, what about using regular headlines, but somehow indicating that all headlines in a given sub-tree should be exported as items (just like they would be exported if the level exceeded org-export-headline-levels). Is this possible? – AlwaysLearning Jul 29 '17 at 21:45
  • Anything is possible, but I can't see an easy way to do it. Although you can set, for example, :EXPORT_OPTIONS: H:1 in a properties drawer for a given sub-tree, this only has an effect when you export only that sub-tree. It does not override the global org-export-headline-levels setting for that sub-tree when you are exporting the entire buffer. I think you would have to modify the function org-export-low-level-p in ox.el if you want to do that. – deprecated Jul 31 '17 at 15:43
  • Can org-inlinetask-default-state be set in the buffer, i.e. using the same mechanism as #+SEQ_TODO? – AlwaysLearning Aug 31 '17 at 14:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.