1
votes

I am using org-mode to write some article now. Org-mode is really a great tool to outline a article with great table and image support.

Org-mode can display inline .png image but .pdf file. Because now org-mode can not control the width or height of shown inline image, so i use matplotlib to produce low dpi .png image in PNG folder for inline display and higher dpi pdf image in PDF folder for finally article export.

In .org file, the image link is like [[file:PNG\*.png]] and \includegraphics{PNG\*.png}in the produced .tex file. Then emacs will use org-latex-pdf-process to render it to pdf file. What I want is that before or in org-latex-pdf-process, a regexp replace function is added to replace the \includegraphics{PDF\*.pdf}, and then produce the final pdf file.

I am a beginner to elisp, so do not know how to put some code here. Can anyone help me?

1
I'm also disappointed by the fact we can't visualize PDF images directly in the Emacs buffers. Maybe that's a question that Emacs devel could and would develop. Maybe by doing some tricks like on-the-fly PDF -> PNG conversion (à la DocView), if there really is some limitation due to PDF. Maybe ask this to the Emacs ML?fniessen

1 Answers

0
votes

With help of some great guys in org-mode mailing list, I finally got the perfect solution.

The detailed can be found in http://lists.gnu.org/archive/html/emacs-orgmode/2014-04/msg01014.html.

The solution is offered by John Kitchin in github: https://github.com/jkitchin/jmax/blob/master/ox-manuscript.el. The functions he wrote really satisfies what I need, which gives me a great help.

Many thanks to him.

Any questions can be posted to ox-manuscript.el.

Cheers!