Emacs org mode can be an excellent note-taking tool. However, if you want to use it to write a formal paper, can you? Of course, you can use org mode and latex in combination. Of course, the most important thing is to solve the reference problem.
The overall idea is as follows:
- Prepare your archive first
You can generate this file by using Emacs bibtex mode or jabref. You can also use other document management tools as long as it can export the file.
- Use Emacs Org to create a project and take notes
There is no difference between creating an org project and a general project.
- Insert a record in reftex Mode
Here, we will focus on the third step, that is, how to insert a records in org mode. From the official reference, we can see that there are three methods to reference the reference documents in the org file, so as to insert the reference documents of the latex class.
1). the simplest method is to specify an archive for all org files, and insert the reference records of this archive in the org file.
The specific method is as follows:CodePut it in. emacs:
(Setq reftex-default-Bibliography (Quote ("Default. bib" "~ /Org/Notes/refer. bib") (Define-key org-mode-map (KBD"C-C )") 'Reftex-citation)
Here,Default. bibAnd~ /Org/Notes/refer. bib. Then, you can run the following command in all org files:C-c)OrM-x reftex-CitationTo insert references. Follow the prompts to perform relevant operations.
2) specify a specific HTML file for a specific org File
This method is introduced in the blog of Marios braindump. The specific method is as follows:
Put the following code in. emacs:
(Defun Org-mode-reftex-Setup() (Load-Library"Reftex") (And (buffer-file-name) (file-exists-P (buffer-file-name) (reftex-Parse-All )) (define-key org-mode-map (KBD"C-C )") 'Reftex-citation) (add-hook 'org-mode-hook' org-mode-reftex-Setup)
Then, in the org file where you want to insert a reference document, add the following section (which can be any location ):
\ Bibliographystyle{Plain}\ Bibliography{Bib-name}
Replace the preceding bib-name with the required file. In this way, you can specify a specific file for the org file. Then, you can useC-c)OrM-x reftex-CitationTo insert references in this file.
The above Code requires you to specify a master file to store the generated Tex file when starting Emacs.
3). Another method is to specify a specific file for a specific org file.
There is also another method that can implement a feature similar to the 2nd method, that is, the method for specifying a specific path file for a specific org file. Put the following code in the. emacs file:
(Defun Org-mode-article-modes() (Reftex-mode t) (and (buffer-file-name) (file-exists-P (buffer-file-name) (reftex-Parse-All ))) (add-hook 'org-mode-hook (Lambda()(If(Member"Reftex"Org-todo-keywords-1) (Org-mode-article-modes ))))
Then, add the following line to the beginning of the org file you want to insert into the archive:
# + Todo: Todo (t) started (s) | done (d) deferred (f) reftex
The other steps are similar to the 2nd methods. I have not carefully tested this method. If you are interested, try it.
By using the above method, you can easily index references in a notebook created using org mode.
of course, if you do not like to use org mode, there are other ideas for writing papers using Emacs, such: emacs + auctex + reftex + outline-minor-mode