I am trying to come up with a template for moderncv package. I would like to be able to render org-mode lists using \cvitem
for example. Better yet, if I could choose the LaTeX command for rendering list items (there are several available in this package). I know about :environment
and :options
but these don't really help. I would really prefer to make this as much independent of the export back-end as possible, so that it would be less painful to export the same document as HTML if need be.
4
3
An export filter (section 12.15 of org documentation) can do that:
(defun my-latex-item (text backend info)
"Replace \\item with \\cvitem."
(when (org-export-derived-backend-p backend 'latex)
(concat "\\cvitem" (substring text 5))))
(add-to-list 'org-export-filter-item-functions
'my-latex-item)
For extending with other back-ends the when
can be replaced by a cond
.