indeed, you should only use that before parsing hook for non-latex exports.
See the documentation for org-export-before-parsing-hook. You need to write a function that takes one argument and does nothing for latex, and calls the csl processor otherwise. perhaps something like this: (defun org-ref-preprocessing (backend) (unless (eq backend 'latex) (org-ref-csl-preprocess-buffer backend))) (setq org-export-before-parsing-hook '(org-ref-preprocessing)) John ----------------------------------- Professor John Kitchin (he/him/his) Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin https://kitchingroup.cheme.cmu.edu https://pointbreezepubs.gumroad.com/ pycse bookstore On Wed, Jul 20, 2022 at 10:48 AM Joseph Vidal-Rosset < jos...@vidal-rosset.net> wrote: > > Le 20/07/2022 à 16:20, Joseph Vidal-Rosset a écrit : > > > > > > Le 20/07/2022 à 15:38, John Kitchin a écrit : > > > >> (let ((org-export-with-broken-links t) > >> (org-latex-pdf-process > >> '("pdflatex -interaction nonstopmode -shell-escape > >> -output-directory %o %f" > >> "bibtex %b" > >> "makeindex %b" > >> "pdflatex -interaction nonstopmode -shell-escape > >> -output-directory %o %f" > >> "pdflatex -interaction nonstopmode -shell-escape > >> -output-directory %o > >> %f"))) > >> (org-open-file (org-latex-export-to-pdf))) > >> > >> > >> this doesn't do anything in your init file to change anything. it only > >> temporarily (let) defines some variables, and then tries to export the > >> current buffer (an elisp file) to pdf and open it. that is a mistake > >> to try. > > > > You are certainly right. I believe that these lines block a > > configuration file that is responsible for the fact that the export via > > pdflatex does not work correctly. This file is therefore loaded after > > myorgexport.el, like mysnippets.el that is not loaded, for example. It > > is also possible that myorgexport.el itself is somewhere incorrect. > > > > I will go to make tests, I'll keep you informed. > > The BIG advantage of launching Emacs Prelude with emacs --daemon is that > it is possible to identify (with your help in this case, John) the > reason of a problem in such or such setup, every personal setup being > located in possible several small files ~/.emacs.d/personal/myfile1.el, > ~/.emacs.d/personal/myfile2.el, etc. > (I am really thankful to Bozhidar Batsov - hence this cc. to his email > address - and to all the contributors of Prelude Emacs, and I recommend > this nice starter kit for Emacs.) > > John, you kindly gave me a solution to get the bibliography in an html > email exported via gnus and orgmode, and in my > .emacs.d/personal/myorgmime.el I had this line of code: > > > (setq org-export-before-parsing-hook '(org-ref-csl-preprocess-buffer)) > ;; to get the bibliography in email (thanks to John Kitchin) > > Deactivated, the export in pdflatex works correctly for the > bibliography... I now have to find a coherent way to get both exports of > bibliography... > > Many thanks John for your so kind, so constant, and so patient help ! > > All the best, > > Jo. > >