Nick Dokos <ndo...@gmail.com> writes: > Mart van de Wege <mvdw...@gmail.com> writes: > >> I'm trying to replace U+00BD in an org buffer with \sfrac{1}{2} during >> export to LaTex, and obviously I'm doing something wrong, or I don't >> understand the documentation. >> >> I use the following code to set up the filter: >> >> #+BIND: org-export-filter-item-functions (latex-replace-half) >> #+BEGIN_SRC emacs-lisp :exports results :results none >> >> (defun latex-replace-half (text backend info) >> (when (org-export-derived-backend-p backend 'latex) >> (replace-regexp-in-string "½" "\\sfrac{1}{2}" text))) >> #+END_SRC >> > > Try > > (replace-regexp-in-string "½" "\\\\sfrac{1}{2}" text))) > Nope. Doesn't do it. Here's the Latex output of the two example lines:
\item 1½ eetl. gehakte peterselie, ½ eetl. azijn, 4 eetl. olie. Laat de gewassen en gebroken vermicelli met de foelie ½ uur in de This was run using final-output-functions, btw. Regards, Mart -- "We will need a longer wall when the revolution comes." --- AJS, quoting an uncertain source.