Sebastien Vauban <sva-n...@mygooglest.com> writes:

> Hello Eric,
>
> Eric S Fraga wrote:
>> Seems to work fine.  I've tried using the export snippets together with
>> the filter for checkboxes and my lists come out looking as they
>> should.  Changing my documents won't be too onerous.
>
> Would you mind sharing your filter (or put it on Worg hacks, maybe)?

Sure:

#+begin_src emacs-lisp
  (defun esf/filter-checkbox-list-items (line backend channel)
    (if (eq backend 'latex)  
        (replace-regexp-in-string "\\\\item \\$\\\\\\(square\\|boxtimes\\)\\$" 
"\\\\item [$\\\\\\1$]" line)))
  
  (add-to-list 'org-export-filter-plain-list-functions 
'esf/filter-checkbox-list-items)
#+end_src

It took a while to suss out the number of backslashes... :)


-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org 
release_8.2.5d-479-g8694aa.dirty


Reply via email to