2

I am using org-mode to write my labbook. Each experiment is an org-file that is exported to PDF when finished. Currently, I am linking to previous experiments by using the resulting PDF. Is it possible to link to org-files instead and have org-mode convert the link to PDF once exported?

This would make it easier to jump from experiment to experiment inside Emacs and from PDF to PDF once exported.

I am aware that this is done for HTML export. How do I set this up for LaTeX export?

  • Can you share one of your books (google drive?) if you don't mind? I'm a org user but I have not be able to use it for anything other than organizing / planning / scheduling. I would like to see how you are doing your lab book. – Prasanna Jan 10 '17 at 15:10
  • 1
    I think it would be best to apply org export filters. orgmode.org/org.html#Advanced-configuration – Dieter.Wilhelm Jan 11 '17 at 6:12
  • @Prasanna I am using the setup by the Kitchin lab - Scimax with which I created a projectile project for each project I am working in. Inside each project I create a folder for each experiment (I give each experiment a number). Then inside that folder I have the .org file for the experiment in which I write down my purpose for the experiment, the procedure (which are also TODO tasks that are scheduled) and my data analysis (with R/ESS) and results from the experiment. The org-file is then exported via latex to PDF. – Cumol Jan 11 '17 at 13:20
  • 1
    @Dieter.Wilhelm thank you for the suggestion, I will give it a look. – Cumol Jan 11 '17 at 13:21
  • 1
    @Dieter.Wilhelm at the end I did the following: (defun my-latex-filter-macro (text backend info) "Replace .org with .pdf" (when (org-export-derived-backend-p backend 'latex) (replace-regexp-in-string "\\.org" ".pdf" text))) (add-to-list 'org-export-filter-link-functions 'my-latex-filter-macro) – Cumol Mar 29 at 9:42
0

In the end I did the following:

(defun my-latex-filter-macro (text backend info)

  "Replace .org with .pdf"

  (when (org-export-derived-backend-p backend 'latex)

    (replace-regexp-in-string "\\.org" ".pdf" text)))



(add-to-list 'org-export-filter-link-functions

             'my-latex-filter-macro)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.