From: John Kitchin <jkitchin@andrew.cmu.edu>
To: Joseph Vidal-Rosset <joseph@vidal-rosset.net>
Cc: org-mode-email <emacs-orgmode@gnu.org>, bozhidar@batsov.dev
Subject: Re: org-ref 3 setup
Date: Wed, 20 Jul 2022 14:20:42 -0400 [thread overview]
Message-ID: <CAJ51ETqkQE7HGaOoh0=XbiQWXJt0SWTOAvh1s4aMiYSB9Zy_ow@mail.gmail.com> (raw)
In-Reply-To: <9e7e014f-bd84-c6cd-62ce-1038495fc3a5@vidal-rosset.net>
[-- Attachment #1: Type: text/plain, Size: 3368 bytes --]
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 <
joseph@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.
>
>
[-- Attachment #2: Type: text/html, Size: 4510 bytes --]
prev parent reply other threads:[~2022-07-20 18:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-20 9:00 org-ref 3 setup Joseph Vidal-Rosset
[not found] ` <CAJ51ETrH-EbRmdQht3MVUqNZS2aJ3krvez2fPcgnLQM_LN+O5A@mail.gmail.com>
2022-07-20 12:51 ` Joseph Vidal-Rosset
[not found] ` <CAJ51ETp3gyA9ts0eZd=sm7er40B2RouL5A=p-mYxUcLjscjC-A@mail.gmail.com>
2022-07-20 14:48 ` Joseph Vidal-Rosset
2022-07-20 18:20 ` John Kitchin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAJ51ETqkQE7HGaOoh0=XbiQWXJt0SWTOAvh1s4aMiYSB9Zy_ow@mail.gmail.com' \
--to=jkitchin@andrew.cmu.edu \
--cc=bozhidar@batsov.dev \
--cc=emacs-orgmode@gnu.org \
--cc=joseph@vidal-rosset.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).