org-mode: Adding bibliography - org-mode

Every time I want to convert an org-file to pdf using org-mode, I need t write the following lines at the end of my file:
* References:
\bibliographystyle{plain}
\bibliography{/path/to/my/bibfile}{}
In org-mode there is the command <s TAB to insert a
#begin src
#end src.
Is there something similar for the bibliography? I would like to have these line automatically added to my files, each time
I fire some <s-command.

Two answers for the price of one:
Look at the easy templates (section 15.2 of the manual) or
Use YASnippet therefore (more generic, and usable in all Emacs parts!).

Related

what does means #+keyword: means in org buffer

in emacs org mode, I saw #+ prefix many times. I think this is like option but I don't know what it is. I have tried to know them, I have been googling, but I couldn't find any good document. anybody know these symbol? is this org macros?
It is just plain text that you write in an org mode file. It may have two different functions:
1.- If you write it at the beginning of the file, it serves as a metadata descriptor or to include options for the file [1]. For example:
#+TITLE: This is the title of this file
#+AUTHOR: Loretta
#+DATE: 2022-10-15
#+STARTUP: content <--- option for displaying the contents
#+OPTIONS: H:3 toc:nil \n:nil #:t ::t |:t <--- different export options
2.- To create a block inside the file. This block may be code meant to be executed [2], a quotation, a comment, etc:
#+begin_src emacs-lisp
(+ 1 2 3 4 5 6 7)
#+end_src
#+begin_comment
Check the following paragraph. I am not really sure if it
has taken into account all the variables.
#+end_comment
[1] See https://orgmode.org/manual/In_002dbuffer-Settings.html for buffer settings and https://orgmode.org/manual/Export-Settings.html for export settings.
[2] See https://orgmode.org/manual/Literal-Examples.html for code blocks.

Can I inline a org file inside another org file?

In latex we can split a big document(paper.tex) into several tex files(abstract.tex,intro.tex ...) which can be inserted inline using \input{paper.tex}.
Is there a similar facility in org-mode?
Just use the include command i.e.
#+INCLUDE abstract.org
#+INCLUDE intro.org
This will inline abstract.org and intro.org in the current org file. See also the org-mode documentation on include files.
Without test, but I think you can just simply add the latex command \input{paper.tex} in any place of .org file you want. It will render the .tex file to final file.
PS: other option: Include-files which are mentioned in the comment.

Org-Mode Tags inside text instead of Headline

I have a half-made latex presentation in a org-mode file. I want to insert tags in paragraphs which are incomplete. Something along these lines,
* Related Work
Prior work was done by ... :incomplete:
Is this possible?
The solution might be in transforming your plain lists or lines to headlines
* Prior work was done by ... :incomplete:
and use following line into the .org file header
#+OPTIONS: H:2 num:2
that describes to which level headlines are enumerated and included into table of contents.

Repeating elements/links in org pages to be published as html?

Is there a simple way to add something like the {Back to Worg's index} to every .org page in a directory which I plan to publish with org-publish-project-alist? Is this accomplished with a #+ tag, or some definition in the .css file?
I looked at how they did it on Worg, and it doesn't look like CSS.
There are a few ways you might be able to do so.
Create a generic file that only includes the details you want in each file. For example:
[[./index.org][Back to index]]
Then use #+include: <filename> at the location in your file where you want the line. (See Include Files)
Alternately you could define a macro in a setupfile (See In-Buffer Settings) that is the definition of the link (or multiple link choices)
#+macro: toIndex [[./index.org][Back to index]]
In both cases it is worth noting that the relative paths are based on the exported file. So a [[../index.org]] will always point to the index.org file in the parent directory, no matter where the setupfile is.

Microsoft Word to Org-mode

I am trying to put the Microsoft Word document in emacs using org-mode. I have copied the Word Document and pasted in emacs. I like to achieve the headings like 7.1.2.4 in org-mode format.
and then link the TOC to appropriate headings. How I can do that? Any suggestions? Any programming language like Perl has done it?
Thanks.
There is ODT2ORG (https://bitbucket.org/josemaria.alkala/odt2org/wiki/Home) which lets you import odt files in org-mode.
Use Openoffice/Libreoffice to produce an .odt from your .doc.
Use odt2org to get an .org.
About the headings: I am not entirely sure I understand you.
there is org-toc.el included in org-mode that provides a seperate buffer with a TOC of your current document (like in Reftex). All the entries there are already links to the individual headings. Also, an exported document will have a TOC included by default without your intervention.
Orgmode does not support automatically numbered headings (yet). However, if you want to export your document to html, docbook, latex, or pdf, your headings will appear numbered and nested (you can tweak the settings quite a lot).
I doubt that you will get your intended result purely automatically but it should work 70% automatically, especially if you have latex installed and simply want to have a good-looking pdf in the end. Convert doc to odt, convert odt to org, open and type "C-c C-e d".
Another option: Save as an HTML file, then use Pandoc to convert the HTML to an .org file.
I've converted loads of Word documents into Org files. It takes minutes to do it by hand.
If you want cross-references, use internal links (4.2 in the current manual).
The * and ** style headings are always likely to be there in Org. Think of the use case where exports are compiled from #+INCLUDEd files, or you have done a selective export using tags. Any kind of single sourcing technology isn't going to display the numbering.
There is a ruby gem which converts doc to md. With pandoc you can convert to org.
https://github.com/benbalter/word-to-markdown