On Wed, 7 Jun 2017, Eric S Fraga wrote:
Hello all,
I have a document with this (ECM) structure:
#+begin_src org
,#+macro: item I{{{n(i)}}}@@latex:}%@@
,#+options: toc:nil num:nil
,* {{{item()}}} Some topic
,* {{{item()}}} Another topic :noexport:
,* {{{item()}}} A final one
#+end_src
I would like the exported headings to be numbered Q1, Q2, ... but only
the exported ones.
Maybe implement somethng like this:
#+BEGIN_SRC emacs-lisp
(defun n-noexport (x y)
(let ((tags (nth 5 (org-heading-components))))
(unless (and tags
(string-match ":noexport:" tags))
(org-macro--counter-increment x y))))
#+END_SRC
#+MACRO: n2 (eval (n-noexport "$1" "$2"))
* heading 1
{{{n2()}}}
* heading 2 :noexport:notever:
{{{n2()}}}
* heading 3
{{{n2()}}}
HTH,
Chuck