Re: [O] bibliography as part of the source document?
You might checkout the function at the end of this org-ref issue: https://github.com/jkitchin/org-ref/issues/176 It provides a way to extract all bibtex src blocks to a file and is a bit different than using org-babel-tangle. Ken Mankoff writes: > On 2016-06-14 at 21:29, Ken Mankoffwrote: >> I don't know how to tell Org to tangle-on-export with an argument or a >> setting, but it can evaluate code blocks on export, and one of those >> can do the tangling for you. The following might work? >> >> #+begin_src emacs-lisp :exports none >> (org-babel-goto-named-src-block "bibtex") >> (org-babel-tangle) >> #+end_src >> >> #+begin_src bibtex :tangle file.bib >> bib contents go here >> #+end_src > > Oops. Consider the above pseudo-code. The bibtex block must be named, so that > (org-babel-goto-NAMED...) can find it. And I'm not sure what "#+begin_src > bibtex" actually means to Org. It might have to be a #+BEGIN_EXAMPLE or a > "#+BEGIN_SRC ", but tangled to a .Bib file. If running > latest Git head, it might also need ":eval no-export" on the bibtex block. > Hopefully this is enough to help you solve it. Feel free to post an MWE if > you get it working. > > -k. -- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu
Re: [O] bibliography as part of the source document?
On 2016-06-14 at 21:29, Ken Mankoffwrote: > I don't know how to tell Org to tangle-on-export with an argument or a > setting, but it can evaluate code blocks on export, and one of those > can do the tangling for you. The following might work? > > #+begin_src emacs-lisp :exports none > (org-babel-goto-named-src-block "bibtex") > (org-babel-tangle) > #+end_src > > #+begin_src bibtex :tangle file.bib > bib contents go here > #+end_src Oops. Consider the above pseudo-code. The bibtex block must be named, so that (org-babel-goto-NAMED...) can find it. And I'm not sure what "#+begin_src bibtex" actually means to Org. It might have to be a #+BEGIN_EXAMPLE or a "#+BEGIN_SRC ", but tangled to a .Bib file. If running latest Git head, it might also need ":eval no-export" on the bibtex block. Hopefully this is enough to help you solve it. Feel free to post an MWE if you get it working. -k.
Re: [O] bibliography as part of the source document?
On 2016-06-13 at 13:28, Sharon Kimblewrote: > Ken Mankoff writes: >> On 2016-06-13 at 13:07, Sharon Kimble wrote: >>> I'm trying to have all my information for a org-mode document >>> exported to latex contained within the source document. Specifically >>> having the bibliography within the source document. >>> >>> But how do I do it? I've tried googling but haven't turned up >>> anything useful. Can you help please? >> >> What about putting the BibTeX contents in the Org file. Tangle on >> export to Bib file. >> > > Yes, that's what I'm trying to do, but how do I tangle it? I don't know how to tell Org to tangle-on-export with an argument or a setting, but it can evaluate code blocks on export, and one of those can do the tangling for you. The following might work? #+begin_src emacs-lisp :exports none (org-babel-goto-named-src-block "bibtex") (org-babel-tangle) #+end_src #+begin_src bibtex :tangle file.bib bib contents go here #+end_src -k.
Re: [O] bibliography as part of the source document?
Ken Mankoffwrites: > On 2016-06-13 at 13:07, Sharon Kimble wrote: >> I'm trying to have all my information for a org-mode document exported >> to latex contained within the source document. Specifically having the >> bibliography within the source document. >> >> But how do I do it? I've tried googling but haven't turned up anything >> useful. Can you help please? > > What about putting the BibTeX contents in the Org file. Tangle on export to > Bib file. > Yes, that's what I'm trying to do, but how do I tangle it? Thanks Sharon. -- A taste of linux = http://www.sharons.org.uk TGmeds = http://www.tgmeds.org.uk Debian 8.4, fluxbox 1.3.7, emacs 25.0.95 signature.asc Description: PGP signature
Re: [O] bibliography as part of the source document?
On 2016-06-13 at 13:07, Sharon Kimblewrote: > I'm trying to have all my information for a org-mode document exported > to latex contained within the source document. Specifically having the > bibliography within the source document. > > But how do I do it? I've tried googling but haven't turned up anything > useful. Can you help please? What about putting the BibTeX contents in the Org file. Tangle on export to Bib file. -k.
Re: [O] #+BIBLIOGRAPHY multiple entries
Hi Johnny, On 24 November 2014 at 08:08, yggdra...@gmx.co.uk wrote: I use #+BIBLIOGRAPHY mybibliographyfile plain which works, but #+BIBLIOGRAPHY myfirstbibliographyfile mysecondbibliographyfile plain does not. Instead of #+BIBLIOGRAPHY I tend to use #+LATEX: \bibliographystyle{plainnat} #+LATEX: \bibliography{C:/Users/andreas/Dropbox/_biblio/refs} were all my bibtex entries are in refs.bib. I keep everything in the one place and hence need to use the full path. You can put these where you want the bibliography placed and you can include multiple files in LaTeX' \bibliography{} command. In your case I imagine it would look something like this. #+LATEX: \bibliographystyle{plainnat} #+LATEX: \bibliography{C:/Users/andreas/Dropbox/_biblio/refs} HTH. Cheers, Andreas
Re: [O] Bibliography woes!
Ken Mankoff mank...@gmail.com writes: On 2014-05-05 at 19:39, John Hendy wrote: If this works, someone can chime in regarding how to modify Org so that it will run the necessary biber/biblatex commands so you don't have to jump to a command line every time. Or perhaps that's a one time thing -- maybe as long as biber generates the .bbl file, you can refer to anything you want in that file from then on? I've found latexmk to be the best tool for compiling LaTeX documents. It runs all necessary commands as many times as needed, including pdflatex, bibtex, biblatex, etc.. It is fairly smart and will run the command to make the index if you load the index, for example. It can run in daemon mode and monitor the included files (and graphics) so if one of those changes, the PDF is regenerated. I prefer daemon mode, so I bring up a terminal and run latexmk file.tex in the folder where I'm working on file.org. This also speeds things up, since exporting to latex is fast, but compiling is slow. I can export and still use emacs, rather than waiting for the compile to finish. This sounds very interesting. Could you please provide some details on how you use latexmk? Do you use any special options? Rainer But if you want to run latexmk from Org, that works too. The -pvc- turns off the preview continuous mode (daemon). (setq org-latex-pdf-process (list /usr/texbin/latexmk -f -gg -pvc- %f)) -k. -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax : +33 - (0)9 58 10 27 44 Fax (D):+49 - (0)3 21 21 25 22 44 email: rai...@krugs.de Skype: RMkrug PGP: 0x0F52F982 pgpO2hoF39fia.pgp Description: PGP signature
Re: [O] Bibliography woes!
On 2014-05-06 at 03:33, Rainer M Krug wrote: Ken Mankoff mank...@gmail.com writes: I've found latexmk to be the best tool for compiling LaTeX documents. This sounds very interesting. Could you please provide some details on how you use latexmk? Do you use any special options? My ~/.latexmkrc file is below. It appears I have extra functions for making glossaries and working with PythonTeX. There is plenty of support for latexmk on TeX.SE https://tex.stackexchange.com/questions/tagged/latexmk Since I turn on preview_continuous_mode in my ~/.latexmkrc, I need to explicitly turn it off if I am calling latexmk from Org, hence the -pvc- option here: (setq org-latex-pdf-process (list /usr/texbin/latexmk -f -gg -pvc- %f)) But as I said, I find I prefer to bring up a terminal in the directory where I am working, and dedicate it to running 'latexmk' in continuous monitoring mode. When I want to clean up a project I'll run latexmk -c file.tex to discard all of the temporary files. I have Skim.app or Preview.app (OS X PDF viewers) open the PDF file. I edit Org files, export to LaTeX (C-c C-e l l), and then keep working while the PDF regenerates. -k. # BEGIN ~/.latexmkrc $pdf_mode = 1; $preview_continuous_mode = 1; $new_viewer_always = 1; $silent = 1; # don't stop on errors $verbose = 0; #$halt_on_error = 1; $clean_ext = 'bbl run.xml %R-blx.bib acn glo xdy synctex.gz'; # continue past errors $force_mode = 1; $shell_escape = 1; # shell escape $pdflatex = 'pdflatex --shell-escape -file-line-error -synctex=1 %O %S'; # $pdf_previewer = 'open -a /Applications/Preview.app'; $pdf_previewer = 'open -a /Users/mankoff/local/Applications/Skim.app'; # Sage: # http://permalink.gmane.org/gmane.comp.mathematics.sage.support/17166 # glossaries http://tex.stackexchange.com/questions/1226/how-to-make-latexmk-use-makeglossaries add_cus_dep('glo', 'gls', 0, 'makeglo2gls'); sub makeglo2gls { system(makeindex -s '$_[0]'.ist -t '$_[0]'.glg -o '$_[0]'.gls '$_[0]'.glo); } # PythonTeX add_cus_dep('pytxcode', 'pyg', 0, 'pythontexcompile'); sub pythontexcompile { system(pythontex.py $_[0]); }
Re: [O] Bibliography woes!
Ken Mankoff mank...@gmail.com writes: On 2014-05-06 at 03:33, Rainer M Krug wrote: Ken Mankoff mank...@gmail.com writes: I've found latexmk to be the best tool for compiling LaTeX documents. This sounds very interesting. Could you please provide some details on how you use latexmk? Do you use any special options? My ~/.latexmkrc file is below. It appears I have extra functions for making glossaries and working with PythonTeX. There is plenty of support for latexmk on TeX.SE https://tex.stackexchange.com/questions/tagged/latexmk Since I turn on preview_continuous_mode in my ~/.latexmkrc, I need to explicitly turn it off if I am calling latexmk from Org, hence the -pvc- option here: (setq org-latex-pdf-process (list /usr/texbin/latexmk -f -gg -pvc- %f)) But as I said, I find I prefer to bring up a terminal in the directory where I am working, and dedicate it to running 'latexmk' in continuous monitoring mode. When I want to clean up a project I'll run latexmk -c file.tex to discard all of the temporary files. I have Skim.app or Preview.app (OS X PDF viewers) open the PDF file. I edit Org files, export to LaTeX (C-c C-e l l), and then keep working while the PDF regenerates. Thanks a lot - this gives me some ideas on how to use it. I also prefer the terminal approach, and I am using it at the moment, but with no additional parameters. Cheers, Rainer -k. # BEGIN ~/.latexmkrc $pdf_mode = 1; $preview_continuous_mode = 1; $new_viewer_always = 1; $silent = 1; # don't stop on errors $verbose = 0; #$halt_on_error = 1; $clean_ext = 'bbl run.xml %R-blx.bib acn glo xdy synctex.gz'; # continue past errors $force_mode = 1; $shell_escape = 1; # shell escape $pdflatex = 'pdflatex --shell-escape -file-line-error -synctex=1 %O %S'; # $pdf_previewer = 'open -a /Applications/Preview.app'; $pdf_previewer = 'open -a /Users/mankoff/local/Applications/Skim.app'; # Sage: # http://permalink.gmane.org/gmane.comp.mathematics.sage.support/17166 # glossaries http://tex.stackexchange.com/questions/1226/how-to-make-latexmk-use-makeglossaries add_cus_dep('glo', 'gls', 0, 'makeglo2gls'); sub makeglo2gls { system(makeindex -s '$_[0]'.ist -t '$_[0]'.glg -o '$_[0]'.gls '$_[0]'.glo); } # PythonTeX add_cus_dep('pytxcode', 'pyg', 0, 'pythontexcompile'); sub pythontexcompile { system(pythontex.py $_[0]); } -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax : +33 - (0)9 58 10 27 44 Fax (D):+49 - (0)3 21 21 25 22 44 email: rai...@krugs.de Skype: RMkrug PGP: 0x0F52F982 pgp7ZOH9UdIFy.pgp Description: PGP signature
Re: [O] Bibliography woes! SOLVED.
John. Thank you for a most informative and useful post. Using your method I've just created the cat.org with 14 bibliographic records! I've amended it slightly, which I'll document in line. John Hendy jw.he...@gmail.com writes: On Mon, May 5, 2014 at 5:23 PM, Sharon Kimble boudic...@skimble.plus.com wrote: Eric S Fraga e.fr...@ucl.ac.uk writes: [...] and this is the bibliography file @Article{, change this line to @Article{1, although I would recommend a more description label personally... I've set it up with the articles author and year, but it is still failing. I'm attaching the original org file, the generated tex and pdf, and the bib file. Hopefully this will help find a solution? I've been following this from a distance, as I'm interested in eventually getting into this. I would kindly ask that you slow down your pace, check things over, and proceed *simply* to solve your problem. Eric advocated using @Article{1, ... Without ever having used biblatex, I immediately wondered whether a comma delimited bibliography would tolerate: @Article{MacRae K, et al;2002, ... The answer is that it will not. You also have multiple lines loading the same package: #+LaTeX_HEADER: \usepackage{biblatex} #+LATEX_HEADER: \usepackage[citestyle=authoryear-icomp,bibstyle=authoryear,hyperref=true,backref=true,maxcitenames=3,url=true,backend=biber,natbib=true]{biblatex} # #+LaTeX_HEADER: \usepackage[backend=bibtex,style=verbose]{biblatex} Lastly, I would highly suggest limiting your requests for help to extremely simple examples. For example, remove packages that do not affect the behavior of the problem, such as bussproofs, babel, fancyhdr, etc. I was able to get your file working via the following method: - Modified cat.bib: @Article{1, author = {MacRae K. Pattison J.}, title = {Home chemotherapy.}, journaltitle = {Nursing Times}, year = {2002}, key = {1}, volume = {98}, number = {35}, pages = {34-35}, } - Modified/shortened/simplified cat.org: # -*- mode:org; mode:reftex; indent-tabs-mode:nil; tab-width:2 -*- #+OPTIONS: toc:nil num:nil ^:{} #+TITLE: Cat on the mat - 2014 #+AUTHOR: Sharon Kimble Sarah ? #+LATEX_CLASS: article #+LATEX_CLASS_OPTIONS: [a4paper] #+LaTeX_HEADER: \usepackage[backend=biber,style=verbose,style=numeric]{biblatex} #+LaTeX_HEADER: \bibliography{/home/jwhendy/Downloads/cat.bib} %%% - change this path #+LaTeX_HEADER: \bibliography{cat * Chapter 1 Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.\cite{1} * Bibliography \printbibliography Note that you needed to load biblatex before your bibliography (which you sort of did, but then re-loaded it with a bunch of options and then perhaps again at the end depending on how Org deals with the # symbol before #+ lines. You can tweak the options to biblatex however you'd like; I just simplified a bit to single down to one line loading it. \bibliography needed to call the file cat, not bibliography. In addition, I had to run C-c C-e l p to export to latex, then check the buffer *Org PDF LaTeX Output* for messages regarding the failed citation. It suggested to run biber on the file cat, which I did from the command line. When you add references to cat.bib you have to run C-c C-e l p again to generate cat.blg. # note that I saved all your stuff in my download folder $ cd ~/Downloads $ biber cat Make sure you have the biber executable installed. I didn't know anything about it and thought biblatex might provide it. I had to explicitly install biber. You should be a path as the response to the following if you have it: $ which biber Running biber generated .bbl. Then run biber cat on the command line to generate cat.bbl. Then you can run C-c C-e l p on cat.org which generates cat.pdf which includes the bibliography! Yahay! Success! Then, re-running C-c C-e l p from Org works for me (at least I think; see attached to verify). Lastly, when I encountered an error, I googled to find out what to do: - Using biber: http://tex.stackexchange.com/questions/26516/how-to-use-biber - Why \bibliography was giving me an error: http://kb.mit.edu/confluence/pages/viewpage.action?pageId=3907111 If this works, someone can chime in regarding how to modify Org so that it will run the necessary biber/biblatex commands so you don't have to jump to a command line every time. Or perhaps that's a one time thing -- maybe as long as biber generates the .bbl file, you can refer to anything you want in that file from then on? If you have this in your .emacs --8---cut here---start-8--- ;; org to latex customisations, -shell-escape needed for minted (setq org-export-dispatch-use-expert-ui t ; non-intrusive export dispatch org-latex-pdf-process ; for regular export '(xelatex -shell-escape
Re: [O] Bibliography woes!
I'm having no success in getting the bibliography to display in my document, so these are my relevant settings - ╭ │#+LaTeX_HEADER: \usepackage{biblatex} │#+LaTeX_HEADER: \bibliography{/home/boudiccas/.emacs.d/research/references.bib} │#+LaTeX_HEADER: \bibliography{references} ╰ Although I cannot be sure, it seems to me that the problem may be that biblatex is not looking for references.bib in the right place. I had similar trouble when I started using citations (then with bibtex). I then solved it by create a link to the bib file in the working directory, and continue to use that solution for everything I write. In your working directory, where you org file is, just create a symbolic link: ln -s /home/boudiccas/.emacs.d/research/references.bib references.bib If my diagnosis is correct, that should solve the problem. Vikas
Re: [O] Bibliography woes!
Hi, Sharon Kimble wrote: But page 3 of what? input line 139 of what? Page 3 of the PDF and input line 139 of the .tex file. It all looks okay to me, except I cant see what the latex warnings relate to. Any ideas folks please? The most likely problem is that you have you have not called bibtex (or biber) the appropriate number of times and so your references have not been processed correctly. The way to check this is to run bibtex or biber (whichever you use, your setup looks like it was designed for bibtex so bibtex is probably the one you want) on your .tex file and then call xelatex again, and see if the errors go away. If that is the problem. You should look at how you have set up org-latex-pdf-process to make sure that it calls xelatex and bibtex the appropriate number of times. (another option is to use latexmk, it is really convenient, but it takes a bit of work to configure it properly). All best, Leonard
Re: [O] Bibliography woes!
Leonard Avery Randall leonard.a.rand...@gmail.com writes: Hi, Sharon Kimble wrote: But page 3 of what? input line 139 of what? Page 3 of the PDF and input line 139 of the .tex file. It all looks okay to me, except I cant see what the latex warnings relate to. Any ideas folks please? The most likely problem is that you have you have not called bibtex (or biber) the appropriate number of times and so your references have not been processed correctly. The way to check this is to run bibtex or biber (whichever you use, your setup looks like it was designed for bibtex so bibtex is probably the one you want) on your .tex file and then call xelatex again, and see if the errors go away. If that is the problem. You should look at how you have set up org-latex-pdf-process to make sure that it calls xelatex and bibtex the appropriate number of times. (another option is to use latexmk, it is really convenient, but it takes a bit of work to configure it properly). Still not getting it right. This is in my setup-testbed.el --8---cut here---start-8--- ;; org to latex customisations, -shell-escape needed for minted (setq org-export-dispatch-use-expert-ui t ; non-intrusive export dispatch org-latex-pdf-process ; for regular export '(xelatex -shell-escape -interaction nonstopmode -output-directory %o %f bibtex %b xelatex -shell-escape -interaction nonstopmode -output-directory %o %f xelatex -shell-escape -interaction nonstopmode -output-directory %o %f xelatex -shell-escape -interaction nonstopmode -output-directory %o %f xelatex -shell-escape -interaction nonstopmode -output-directory %o %f)) --8---cut here---end---8--- and the partial transcript of the output log --8---cut here---start-8--- LaTeX Warning: Citation '4' on page 3 undefined on input line 135. LaTeX Warning: Citation '5' on page 3 undefined on input line 137. LaTeX Warning: Citation '4' on page 3 undefined on input line 145. LaTeX Warning: Citation '6' on page 3 undefined on input line 154. LaTeX Warning: Citation '7' on page 4 undefined on input line 167. LaTeX Warning: Citation '8' on page 4 undefined on input line 175. LaTeX Warning: Citation '12' on page 4 undefined on input line 204. LaTeX Warning: Citation '7' on page 4 undefined on input line 209. LaTeX Warning: Citation '9' on page 4 undefined on input line 222. LaTeX Warning: Citation '1' on page 5 undefined on input line 259. LaTeX Warning: Citation '3' on page 6 undefined on input line 285. LaTeX Warning: Citation '10' on page 7 undefined on input line 349. LaTeX Warning: Citation '10' on page 7 undefined on input line 400. LaTeX Warning: Citation '13' on page 9 undefined on input line 458. LaTeX Warning: Citation '11' on page 9 undefined on input line 475. LaTeX Warning: Citation '14' on page 9 undefined on input line 495. LaTeX Warning: Citation '14' on page 10 undefined on input line 527. LaTeX Warning: Citation '2' on page 11 undefined on input line 569. LaTeX Warning: Empty bibliography on input line 576. [11] (./uh2014.aux) LaTeX Warning: There were undefined references. Package biblatex Warning: Please (re)run Biber on the file: (biblatex)uh2014 (biblatex)and rerun LaTeX afterwards. --8---cut here---end---8--- and in my org-mode file I have these headers --8---cut here---start-8--- #+LaTeX_HEADER: \usepackage{biblatex} #+LaTeX_HEADER: \usepackage[backend=biber,style=verbose]{biblatex} #+LaTeX_HEADER: \bibliography{/home/boudiccas/.emacs.d/research/references.bib} #+LaTeX_HEADER: \bibliography{references} --8---cut here---end---8--- I have created the link to the reference file in my $USER/.emacs.d/org/ directory using this command ╭ │ln -s /home/boudiccas/.emacs.d/research/references.bib references.bib ╰ Any ideas please folks, or some code to try please? Thanks Sharon. -- A taste of linux = http://www.sharons.org.uk my git repo = https://bitbucket.org/boudiccas/dots TGmeds = http://www.tgmeds.org.uk Debian testing, Fluxbox 1.3.5, emacs 24.4.50.19 signature.asc Description: PGP signature
Re: [O] Bibliography woes!
Any ideas please folks, or some code to try please? I use #+LATEX_HEADER: \usepackage[citestyle=authoryear-icomp,bibstyle=authoryear,hyperref=true,backref=true,maxcitenames=3,url=true,backend=biber,natbib=true]{biblatex} Can you try this, and if it works, modify as you prefer. Also, as Leonard suggested, I would create a tex file, and work on it from the terminal to see what is wrong. Compile the tex file, run biber and then compile the tex file again. This would help identify what is wrong. Vikas
Re: [O] Bibliography woes!
Hi Sharon, Your setup seems to only call bibtex once. I find that with biblatex this is usually not enough to resolve references. I would call bibtex a second time after the second run of biblatex. All best, Leonard
Re: [O] Bibliography woes!
Vikas Rawal vikasli...@agrarianresearch.org writes: Any ideas please folks, or some code to try please? I use #+LATEX_HEADER: \usepackage [citestyle=authoryear-icomp,bibstyle=authoryear,hyperref=true,backref=true,maxcitenames=3,url=true,backend=biber,natbib=true]{biblatex} Can you try this, and if it works, modify as you prefer. Also, as Leonard suggested, I would create a tex file, and work on it from the terminal to see what is wrong. Compile the tex file, run biber and then compile the tex file again. This would help identify what is wrong. How do I do it from the command-line please? Using what commands? I can do it from inside org-mode, and I've created a test file and bib references, details now. This is the test file --8---cut here---start-8--- # -*- mode:org; mode:reftex; indent-tabs-mode:nil; tab-width:2 -*- #+OPTIONS: toc:nil num:nil #+OPTIONS: ^:{} #+TITLE: Cat on the mat - 2014 #+AUTHOR: Sharon Kimble Sarah ? #+LATEX_CLASS: article #+LATEX_CLASS_OPTIONS: [a4paper] #+LATEX_HEADER: \usepackage [citestyle=authoryear-icomp,bibstyle=authoryear,hyperref=true,backref=true,maxcitenames=3,url=true,backend=biber,natbib=true]{biblatex} # #+LATEX_HEADER: \usepackage[hyperref,x11names]{xcolor} # #+LATEX_HEADER: \usepackage[colorlinks=true]{hyperref} #+LaTeX_HEADER: \usepackage{bussproofs} #+LaTeX_HEADER: \usepackage{amsmath,amssymb,amsopn} #+LaTeX_HEADER: \usepackage{graphicx} #+LaTeX_HEADER: \usepackage{makeidx} %robustindex % Indexing #+LaTeX_HEADER: \usepackage[british]{babel} % For british english hyphenation patterns #+LaTeX_HEADER: \usepackage{fancyhdr} % Change caption style; changes headers and page styles # #+LaTeX_HEADER: \usepackage{biblatex} # #+LaTeX_HEADER: \usepackage[backend=bibtex,style=verbose]{biblatex} #+LaTeX_HEADER: \bibliography{/home/boudiccas/.emacs.d/research/cat.bib} #+LaTeX_HEADER: \bibliography{references} \pagebreak * Chapter 1 Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius \cite{1}. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum. * Chapter 2 Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum. * Bibliography \printbibliography * Index --8---cut here---end---8--- and this is the bibliography file --8---cut here---start-8--- @Article{, author = {MacRae K. Pattison J.}, title ={Home chemotherapy.}, journaltitle = {Nursing Times}, year = {2002}, key = {1}, volume = {98}, number = {35}, pages ={34-35}, } --8---cut here---end---8--- and this is the pdf output file --8---cut here---start-8--- This is XeTeX, Version
Re: [O] Bibliography woes!
On Monday, 5 May 2014 at 18:08, Sharon Kimble wrote: [...] How do I do it from the command-line please? Using what commands? I can do it from inside org-mode, and I've created a test file and bib references, details now. Sharon, have you not seen my other email? Your problem is the actual bibtex entry is wrong, missing the label that is needed to be able to cite it in LaTeX. [...] lectores legere me lius quod ii legunt saepius \cite{1}. Claritas est etiam processus [...] and this is the bibliography file @Article{, change this line to @Article{1, although I would recommend a more description label personally... -- : Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.2, Org release_8.2.6-923-g233c11
Re: [O] Bibliography woes!
Eric S Fraga e.fr...@ucl.ac.uk writes: On Monday, 5 May 2014 at 18:08, Sharon Kimble wrote: [...] How do I do it from the command-line please? Using what commands? I can do it from inside org-mode, and I've created a test file and bib references, details now. Sharon, have you not seen my other email? Your problem is the actual bibtex entry is wrong, missing the label that is needed to be able to cite it in LaTeX. I'd sent my reply before getting and reading your email, sorry Eric. [...] lectores legere me lius quod ii legunt saepius \cite{1}. Claritas est etiam processus [...] and this is the bibliography file @Article{, change this line to @Article{1, although I would recommend a more description label personally... I've set it up with the articles author and year, but it is still failing. I'm attaching the original org file, the generated tex and pdf, and the bib file. Hopefully this will help find a solution? Thanks Sharon. --8---cut here---start-8--- Attachments % Created 2014-05-05 Mon 23:14 \documentclass[a4paper]{article} \usepackage[T1]{fontenc} \usepackage{fixltx2e} \usepackage{graphicx} \usepackage{longtable} \usepackage{float} \usepackage{wrapfig} \usepackage{rotating} \usepackage[normalem]{ulem} \usepackage{amsmath} \usepackage{textcomp} \usepackage{marvosym} \usepackage[nointegrals]{wasysym} \usepackage{amssymb} \usepackage{hyperref} \tolerance=1000 \usepackage{libertine} \usepackage{xltxtra} \usepackage{amsmath} \usepackage{bussproofs} \usepackage{amsmath,amssymb,amsopn} \usepackage{graphicx} \usepackage{makeidx} %robustindex % Indexing \usepackage[british, english]{babel} % For british english hyphenation patterns \usepackage{fancyhdr} % Change caption style; changes headers and page styles \usepackage{biblatex} \bibliography{/home/boudiccas/.emacs.d/research/cat.bib} \usepackage[citestyle=authoryear-icomp,bibstyle=authoryear,hyperref=true,backref=true,maxcitenames=3,url=true,backend=biber,natbib=true]{biblatex} \bibliography{references} \author{Sharon Kimble \ Sarah ?} \date{\today} \title{Cat on the mat - 2014} \hypersetup{ pdfkeywords={}, pdfsubject={}, pdfcreator={Emacs 24.4.50.19 (Org mode 8.2.6)}} \begin{document} \maketitle \pagebreak \section*{Chapter 1} \label{sec-1} Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius \cite{MacRae K, et al;2002}. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum. \section*{Chapter 2} \label{sec-2} Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum. \section*{Bibliography} \label{sec-3} \printbibliography \section*{Index} \label{sec-4} % Emacs 24.4.50.19 (Org mode 8.2.6) \end{document} cat.pdf Description: Adobe PDF document @Article{MacRae K, et al;2002, author = {MacRae K. Pattison J.}, title = {Home chemotherapy.},
Re: [O] Bibliography woes!
Hi, As Henry just noted, one of your main problem is your bibtex key. It should not contain spaces, commas, backslashes, semicolons, or other special characters that might mess up the syntax of the bibtex file. A common convention is to use author:year or if you have many articles by the same authors in the same year you can use author:yeara, author:yearb etc. All best, Leonard
Re: [O] Bibliography woes!
On 2014-05-05 at 19:39, John Hendy wrote: If this works, someone can chime in regarding how to modify Org so that it will run the necessary biber/biblatex commands so you don't have to jump to a command line every time. Or perhaps that's a one time thing -- maybe as long as biber generates the .bbl file, you can refer to anything you want in that file from then on? I've found latexmk to be the best tool for compiling LaTeX documents. It runs all necessary commands as many times as needed, including pdflatex, bibtex, biblatex, etc.. It is fairly smart and will run the command to make the index if you load the index, for example. It can run in daemon mode and monitor the included files (and graphics) so if one of those changes, the PDF is regenerated. I prefer daemon mode, so I bring up a terminal and run latexmk file.tex in the folder where I'm working on file.org. This also speeds things up, since exporting to latex is fast, but compiling is slow. I can export and still use emacs, rather than waiting for the compile to finish. But if you want to run latexmk from Org, that works too. The -pvc- turns off the preview continuous mode (daemon). (setq org-latex-pdf-process (list /usr/texbin/latexmk -f -gg -pvc- %f)) -k.
Re: [O] Bibliography and ODT
Hi, What seems to work for most people is exporting to latex, running bibtex, and using one of these tools to convert to ODT: - TeX4ht (the usual recommendation) - Pandoc or to convert to a format that ODT imports reasonably well: - LaTeX2RTF (and import RTF into LibreOffice) - LaTeX2HTML (and copy-paste or import HTML into LibreOffice) If you're feeling adventurous, you may want to try a half-baked solution of mine: http://lists.gnu.org/archive/html/emacs-orgmode/2012-01/msg00128.html Feedback is appreciated. Yours, Christian Roger Mason writes: Hello, I'm finishing a paper that will need to be submitted to the publisher as MS Word. I use neither Word nor Libre/OpenOffice. I need to have a bibliography with cross-references from the text and intended to export from org to ODT then Word. My bibliography file is in bibtex format. After a search I see various messages discussing bibliographies but I'm unsure what the current situation is with respect to exporting to ODT.Can someone enlighten me? If direct export to ODT of a document with a bibliography is not currently implemented, can someone suggest a workflow to get from org - ODT? Thanks, Roger This electronic communication is governed by the terms and conditions at http://www.mun.ca/cc/policies/electronic_communications_disclaimer_2012.php
Re: [O] Bibliography and ODT
hello Christian, On 07/14/2013 05:07 PM, Christian Moe wrote: Hi, What seems to work for most people is exporting to latex, running bibtex, and using one of these tools to convert to ODT: - TeX4ht (the usual recommendation) - Pandoc or to convert to a format that ODT imports reasonably well: - LaTeX2RTF (and import RTF into LibreOffice) - LaTeX2HTML (and copy-paste or import HTML into LibreOffice) If you're feeling adventurous, you may want to try a half-baked solution of mine: http://lists.gnu.org/archive/html/emacs-orgmode/2012-01/msg00128.html Feedback is appreciated. Yours, Christian Thanks. I'll try one (or more) of those. Cheers, Roger This electronic communication is governed by the terms and conditions at http://www.mun.ca/cc/policies/electronic_communications_disclaimer_2012.php
Re: [O] Bibliography
at the keyword please. Here's a new take on the problem. You need to use latest maint (or master) revision. What do you think? I have been trying ox-bibtex.el. One problem I have is that the \cite{key} does not put a number with a link to the citation, but puts [key] in place of the number. I have tried different styles, but nothing seems to work. See, for example, http://www.indianstatistics.org/education.html. \cite{vikaseducation2011} shows up as [vikaseducation2011] instead of [1]. Any idea why this is happening? Vikas
Re: [O] Bibliography
Hello, Vikas Rawal vikasli...@agrarianresearch.org writes: I have been trying ox-bibtex.el. One problem I have is that the \cite{key} does not put a number with a link to the citation, but puts [key] in place of the number. I have tried different styles, but nothing seems to work. See, for example, http://www.indianstatistics.org/education.html. \cite{vikaseducation2011} shows up as [vikaseducation2011] instead of [1]. Any idea why this is happening? Yes: code typo. Here's an update. Regards, -- Nicolas Goaziou ox-bibtex.el Description: application/emacs-lisp
Re: [O] Bibliography
Hello, Fabrice Popineau fabrice.popin...@supelec.fr writes: It defnitely helps a lot with Org-LaTeX files (scientific papers). There is one thing that is not taken into account and I wonder if there is an Org solution for it. In laTeX you can use \cite{foo1999, foo2002} . I don't think that current links in Org allow this and I don't see an easy way for it. In Org, you would have [[bibtex:foo1999]][[bibtex:foo2002]] . May be the exporter for bibtex links should look around and merge other links found. Fabrice Could it be possible to allow [[bibtex:foo1999, foo2002]] No, it's not possible (what would be the destination of such link anyway?). Though, the current implementation of ox-bibtex.el (latest posted in this thread) should split \cite{foo1999, foo2002} into: [a name=#foo1999foo1999/a][a name=#foo2002foo1999/a] Isn't it the correct behaviour? Regards, -- Nicolas Goaziou
Re: [O] Bibliography
See, for example, http://www.indianstatistics.org/education.html. \cite{vikaseducation2011} shows up as [vikaseducation2011] instead of [1]. Any idea why this is happening? Yes: code typo. Here's an update. Thanks. Vikas
Re: [O] Bibliography
It defnitely helps a lot with Org-LaTeX files (scientific papers). There is one thing that is not taken into account and I wonder if there is an Org solution for it. In laTeX you can use \cite{foo1999, foo2002} . I don't think that current links in Org allow this and I don't see an easy way for it. In Org, you would have [[bibtex:foo1999]][[bibtex:foo2002]] . May be the exporter for bibtex links should look around and merge other links found. Fabrice Could it be possible to allow [[bibtex:foo1999, foo2002]] 2013/5/13 Vikas Rawal vikasli...@agrarianresearch.org This works fine except that I can't place it at the keyword. How does one do it? I thought having a line say [BIBLIOGRAPHY] would work but it does not. Figured it myself. Placing the line '#+BIBLIOGRAPHY: blah blah...' at the right place did it. Thanks again, Vikas -- Fabrice Popineau - SUPELEC Département Informatique 3, rue Joliot Curie 91192 Gif/Yvette Cedex Tel direct : +33 (0) 169851950 Standard : +33 (0) 169851212 --
Re: [O] Bibliography
Hello, Vikas Rawal vikasli...@agrarianresearch.org writes: Actually, ox-html.el also tries to do something with bibliographies, which introduces the duplication. We should decide if the code handling them should be in contrib/ or in the various export back-ends. Since HTML handling requires external programs, I lean towards the former. I agree. Better to keep it separately in contrib/ If we agree, I'll remove the faulty code from ox-html.el and prepare a new version for ox-bibtex.el. +1 from me. By the way, where should the bibliography be inserted: at the keyword or at the end of the document (in both HTML and LaTeX)? at the keyword please. Here's a new take on the problem. You need to use latest maint (or master) revision. What do you think? I'm Cc'ing Taru Karttunen, the org-exp-bibtex.el author, to know if he agrees with the changes. Regards, -- Nicolas Goaziou ox-bibtex.el Description: application/emacs-lisp
Re: [O] Bibliography
By the way, where should the bibliography be inserted: at the keyword or at the end of the document (in both HTML and LaTeX)? at the keyword please. Here's a new take on the problem. You need to use latest maint (or master) revision. What do you think? This works fine except that I can't place it at the keyword. How does one do it? I thought having a line say [BIBLIOGRAPHY] would work but it does not. Vikas
Re: [O] Bibliography
This works fine except that I can't place it at the keyword. How does one do it? I thought having a line say [BIBLIOGRAPHY] would work but it does not. Figured it myself. Placing the line '#+BIBLIOGRAPHY: blah blah...' at the right place did it. Thanks again, Vikas
Re: [O] Bibliography
Vikas Rawal vikasli...@agrarianresearch.org writes: Note for Mac OSX users:. I am using Ubuntu Precise, not OSX, and TeXlive 2012, not 2010, and I got the Executing bibtex2html failed when testing this also (even without limit:t). The only way I can imagine to work around was to first run the recommended 'export TMPDIR=.' in a terminal, and then 'emacs' in the same terminal. I wish I knew a cleaner way to do that, since I imagine it would not be wise to put 'export TMPDIR=.' in .bashrc. This may be the cleaner solution: http://lists.gnu.org/archive/html/emacs-orgmode/2012-11/msg00164.html Thanks for your followup! In my case, though, Emacs can find the executable of bibtex2html. However, another message in the thread you mentioned together with some googling led me to adding 'TEXMFOUTPUT = /tmp' to /usr/local/texlive/2012/texmf.cnf, and now I can reproduce your results, namely, without limit:t, the bibliography in the html export appears twice and with it, I get Executing bibtex2html failed.
Re: [O] Bibliography
Note for Mac OSX users:. I am using Ubuntu Precise, not OSX, and TeXlive 2012, not 2010, and I got the Executing bibtex2html failed when testing this also (even without limit:t). The only way I can imagine to work around was to first run the recommended 'export TMPDIR=.' in a terminal, and then 'emacs' in the same terminal. I wish I knew a cleaner way to do that, since I imagine it would not be wise to put 'export TMPDIR=.' in .bashrc. This may be the cleaner solution: http://lists.gnu.org/archive/html/emacs-orgmode/2012-11/msg00164.html Vikas
Re: [O] Bibliography
Yes please. I am waiting for something that will export bibtex to html. With the old exporter, org-exp-bibtex used bibtex2html to achieve it. But nothing similar is possible with the new exporter. I attach a port of org-exp-bibtex.el (renamed ox-bibtex.el) for the new export framework. Would you mind testing it? A big thank you! Here is a quick comment. More to follow. If an org file, say temp.org, refers to a bibtex file called foo.bib, ox-bibtex creates two files: foo.html and foo_bib.html. I suggest that these be named foo_temp.html and foo_temp_bib.html. Since there may be multiple org files in a project linking to the same bibtex file, the present implementation would cause a problem. Vikas
Re: [O] Bibliography
I attach a port of org-exp-bibtex.el (renamed ox-bibtex.el) for the new export framework. Would you mind testing it? I am attaching my test files. I have following problems. 1. When I use limit:t, I get an error: if: Executing bibtex2html failed 2. The bibliography is inserted in the exported html file above the main body of org file as well as below the main body of the org file. Am I doing something silly? Vikas
Re: [O] Bibliography
I attach a port of org-exp-bibtex.el (renamed ox-bibtex.el) for the new export framework. Would you mind testing it? A big thank you! Here is a quick comment. More to follow. If an org file, say temp.org, refers to a bibtex file called foo.bib, ox-bibtex creates two files: foo.html and foo_bib.html. I suggest that these be named foo_temp.html and foo_temp_bib.html. Since there may be multiple org files in a project linking to the same bibtex file, the present implementation would cause a problem. Sorry, this problem will perhaps be relevant only when ox-bibtex is being used with limit:t, so that only cited references would show up on each page. Since limit:t is not yet working for me, I am unable to test it. Vikas
Re: [O] Bibliography
I am attaching my test files. I have following problems. Sorry, forgot to attach my files. Here they are. Vikas #+TITLE: Statistics on Indian Economy and Society #+LINK_UP: data.html #+LINK_HOME: index.html #+OPTIONS: num:nil toc:nil #+HTML_HEAD:link rel=stylesheet type=text/css href=css/worg.css / #+BIBLIOGRAPHY: bibliobase plain * Introductory notes on sources of data Data on banking are primarily available from the Reserve Bank of India. There are three major sources of data: 1. Basic Statistical Returns of Scheduled Commercial Banks in India 2. Statistical Tables Relating to Banks in India 3. Trend and Progress of Banking in India. \cite{ramakumar2011} % This file was created with JabRef 2.7b. % Encoding: UTF-8 @BOOK{acharyawages1988, title = {Agricultural wages in India: A disaggregated analysis}, publisher = {Center for Asian Development Studies, Boston University}, year = {1988}, author = {Acharya, S.} } @TECHREPORT{RePEc:iim:iimawp:wp01456, author = {Bhattacharjee, Sourindra and Desai, B M and Naik, Gopal}, title = {Viability of Rural Banking by The Nationalized Commercial Banks in India}, institution = {Indian Institute of Management Ahmedabad, Research and Publication Department}, type = {IIMA Working Papers}, number = {WP1997-07-01_01456}, abstract = {This paper examines the viability of rural banking by the Nationalized Commercial Banks and the factors influencing it. The viability was examined using both cost and profitability analyses. Theory of costs is used for the former, while multi-variate econometric model is formulated for the latter. Factors influencing viability in both the analysis are classified into innovative and non-innovative based on unique characteristics of rural banking in India. The results show that rural banking is viable and it could be further improved by reaping scale economies rather than raising interest rate. But this would require more decentralized, autonomous and accountable form of rural banking.}, url = {http://ideas.repec.org/p/iim/iimawp/wp01456.html} } @ARTICLE{chavangender2008, author = {Chavan, P.}, title = {Gender Inequality in Banking Services}, journal = {Economic and Political Weekly}, year = {2008}, pages = {18--21}, publisher = {JSTOR} } @ARTICLE{chavancredit2007, author = {Chavan, P.}, title = {Access to Bank Credit: Implications for Dalit Rural Households}, journal = {Economic and Political Weekly}, year = {2007}, pages = {3219--3224}, } @ARTICLE{chavanbanking2005, author = {Chavan, P.}, title = {How'Inclusive'Are Banks under Financial Liberalisation?}, journal = {Economic and Political Weekly}, year = {2005}, pages = {4647--4649}, } @ARTICLE{chavanwages2006, author = {Chavan, P. and Bedamatta, R.}, title = {Trends in agricultural wages in India 1964-65 to 1999-2000}, journal = {Economic and Political Weekly}, year = {2006}, pages = {4041-4051}, } @ARTICLE{chavanmicrocredit2009, author = {Chavan, P. and Birajdar, B.}, title = {Micro finance and financial inclusion of women: An evaluation}, journal = {Reserve Bank of India Occasional Papers}, year = {2009}, volume = {30}, pages = {109-129}, number = {2}, } @ARTICLE{chavanmicrocredit2002, author = {Chavan, P. and Ramakumar, R.}, title = {Micro-credit and rural poverty: An analysis of empirical evidence}, journal = {Economic and Political Weekly}, year = {2002}, pages = {955-965}, } @ARTICLE{gaihawages1997, author = {Gaiha, R.}, title = {Do rural public works influence agricultural wages? The case of the employment guarantee scheme in India}, journal = {Oxford Development Studies}, year = {1997}, volume = {25}, pages = {301--314}, number = {3}, publisher = {Taylor \ Francis} } @ARTICLE{josewages1988, author = {Jose, AV}, title = {Agricultural wages in India}, journal = {Economic and Political Weekly}, year = {1988}, pages = {46--58}, publisher = {JSTOR} } @ARTICLE{lalwages1976, author = {Lal, D.}, title = {Agricultural growth, real wages, and the rural poor in India}, journal = {Economic and Political Weekly}, year = {1976}, pages = {47--61}, publisher = {JSTOR} } @BOOK{vkr_wagelabour_1995, title = {Wage Labour and Unfreedom in Agriculture: An Indian Case Study}, publisher = {Clarendon Press}, author = {Ramachandran, V. K.}, altauthor = {Ramachandran, V. K.} } @ARTICLE{ramachandranbanking2002, author = {Ramachandran, V. K. and Swaminathan, Madhura}, title = {Rural banking and landless labour households: institutional reform and rural credit markets in India}, journal = {Journal of Agrarian Change}, year = {2002}, volume = {2}, pages = {502--544}, number = {4}, publisher = {Wiley Online Library} } @BOOK{vkrvrms_andhra_2010, title = {Socio-economic Surveys of Three Villages in Andhra Pradesh: A Study
Re: [O] Bibliography
I attach a port of org-exp-bibtex.el (renamed ox-bibtex.el) for the new export framework. Would you mind testing it? In the latex export, the bibliography is added before the main content of the org file. The tex file shows following lines inserted before the main content rather than after. *** \bibliographystyle{plain} \bibliography{foo} *** Vikas
Re: [O] Bibliography
Vikas Rawal vikasli...@agrarianresearch.org writes: I attach a port of org-exp-bibtex.el (renamed ox-bibtex.el) for the new export framework. Would you mind testing it? I am attaching my test files. I have following problems. 1. When I use limit:t, I get an error: if: Executing bibtex2html failed For this, maybe you are getting the error mentioned in the page https://www.lri.fr/~filliatr/bibtex2html/, in the paragraph starting Note for Mac OSX users:. I am using Ubuntu Precise, not OSX, and TeXlive 2012, not 2010, and I got the Executing bibtex2html failed when testing this also (even without limit:t). The only way I can imagine to work around was to first run the recommended 'export TMPDIR=.' in a terminal, and then 'emacs' in the same terminal. I wish I knew a cleaner way to do that, since I imagine it would not be wise to put 'export TMPDIR=.' in .bashrc. However, the exported html file does not include any bibliograpy at all. :( 2. The bibliography is inserted in the exported html file above the main body of org file as well as below the main body of the org file. Am I doing something silly? Vikas
Re: [O] Bibliography
Hello, Vikas Rawal vikasli...@agrarianresearch.org writes: I am attaching my test files. I have following problems. 1. When I use limit:t, I get an error: if: Executing bibtex2html failed OK, I'll have a look at it. 2. The bibliography is inserted in the exported html file above the main body of org file as well as below the main body of the org file. Am I doing something silly? Actually, ox-html.el also tries to do something with bibliographies, which introduces the duplication. We should decide if the code handling them should be in contrib/ or in the various export back-ends. Since HTML handling requires external programs, I lean towards the former. If we agree, I'll remove the faulty code from ox-html.el and prepare a new version for ox-bibtex.el. By the way, where should the bibliography be inserted: at the keyword or at the end of the document (in both HTML and LaTeX)? Regards, -- Nicolas Goaziou
Re: [O] Bibliography
Hi Nicolas, Thanks a lot for taking quickly of this bib issue. 2013/5/9 Nicolas Goaziou n.goaz...@gmail.com Hello, Vikas Rawal vikasli...@agrarianresearch.org writes: 2. The bibliography is inserted in the exported html file above the main body of org file as well as below the main body of the org file. Am I doing something silly? Actually, ox-html.el also tries to do something with bibliographies, which introduces the duplication. We should decide if the code handling them should be in contrib/ or in the various export back-ends. Since HTML handling requires external programs, I lean towards the former. I would tend to agree. If we agree, I'll remove the faulty code from ox-html.el and prepare a new version for ox-bibtex.el. By the way, where should the bibliography be inserted: at the keyword or at the end of the document (in both HTML and LaTeX)? At the keyword IMHO. Fabrice
Re: [O] Bibliography
Actually, ox-html.el also tries to do something with bibliographies, which introduces the duplication. We should decide if the code handling them should be in contrib/ or in the various export back-ends. Since HTML handling requires external programs, I lean towards the former. I agree. Better to keep it separately in contrib/ If we agree, I'll remove the faulty code from ox-html.el and prepare a new version for ox-bibtex.el. +1 from me. By the way, where should the bibliography be inserted: at the keyword or at the end of the document (in both HTML and LaTeX)? at the keyword please. Thanks again, Vikas
Re: [O] Bibliography
Hello, Vikas Rawal vikasli...@agrarianresearch.org writes: My only concern is about users expecting the keyword to be recognized in other back-ends. Yes please. I am waiting for something that will export bibtex to html. With the old exporter, org-exp-bibtex used bibtex2html to achieve it. But nothing similar is possible with the new exporter. I attach a port of org-exp-bibtex.el (renamed ox-bibtex.el) for the new export framework. Would you mind testing it? Thank you. Regards, -- Nicolas Goaziou ox-bibtex.el Description: application/emacs-lisp
Re: [O] Bibliography
On Mon, May 06, 2013 at 04:26:16PM +0200, Fabrice Popineau wrote: Is it me or is it normal that the: #+Bibliography: foo plain line is not exported by the LaTeX backend? I assume that: \bibliography{foo} \bibliographystyle{plain} is a decent way to handle it. Sometime back there was talk about integrating bibliography in the Org syntax. That would make it backend agnostic (always a goal with most Org features). If you are interested, take a look at the following thread. http://thread.gmane.org/gmane.emacs.orgmode/67488/focus=67521 -- Suvayu Open source is the future. It sets us free.
Re: [O] Bibliography
Sure, I remember this thread and it is clear that the problem is very different when it is for LaTeX of for and HTML backend. However, Reftex is provided with Emacs, and it is also integrated to Org mode. So I was trying to solve my simple problem about the bibliography keyword this way: (defadvice org-latex-keyword (around org-latex-keyword-bibliography) Exports `bibliography' keyword with LaTeX backend. (let ((key (org-element-property :key (ad-get-arg 0))) (value (org-element-property :value (ad-get-arg 0 (if (and (string= key BIBLIOGRAPHY) (string-match \\(\\S-+\\)[ \t]+\\(\\S-+\\)\\([^\r\n]*\\) value)) (let ((bibfile (match-string 1 value)) (bibstyle (match-string 2 value))) (format \\bibliography{%s}\n\\bibliographystyle{%s} bibfile bibstyle)) ad-do-it))) (ad-activate 'org-latex-keyword) in my personal Org mode setup. However, it does not work. The advice is called and returns the string, but somehow it is not inserted in the buffer. If I do the same thing in ox-latex.el:org-latex-keyword function, it does work. Any idea why ? Fabrice 2013/5/6 Suvayu Ali fatkasuvayu+li...@gmail.com On Mon, May 06, 2013 at 04:26:16PM +0200, Fabrice Popineau wrote: Is it me or is it normal that the: #+Bibliography: foo plain line is not exported by the LaTeX backend? I assume that: \bibliography{foo} \bibliographystyle{plain} is a decent way to handle it. Sometime back there was talk about integrating bibliography in the Org syntax. That would make it backend agnostic (always a goal with most Org features). If you are interested, take a look at the following thread. http://thread.gmane.org/gmane.emacs.orgmode/67488/focus=67521 -- Suvayu Open source is the future. It sets us free. -- Fabrice Popineau - SUPELEC Département Informatique 3, rue Joliot Curie 91192 Gif/Yvette Cedex Tel direct : +33 (0) 169851950 Standard : +33 (0) 169851212 --
Re: [O] Bibliography
Hello, Fabrice Popineau fabrice.popin...@supelec.fr writes: Sure, I remember this thread and it is clear that the problem is very different when it is for LaTeX of for and HTML backend. However, Reftex is provided with Emacs, and it is also integrated to Org mode. Since it is back-end dependent, why don't you use: #+latex: \bibliography{...}\bibilographystyle{...} instead? So I was trying to solve my simple problem about the bibliography keyword this way: (defadvice org-latex-keyword (around org-latex-keyword-bibliography) Exports `bibliography' keyword with LaTeX backend. (let ((key (org-element-property :key (ad-get-arg 0))) (value (org-element-property :value (ad-get-arg 0 (if (and (string= key BIBLIOGRAPHY) (string-match \\(\\S-+\\)[ \t]+\\(\\S-+\\)\\([^\r\n]*\\) value)) (let ((bibfile (match-string 1 value)) (bibstyle (match-string 2 value))) (format \\bibliography{%s}\n\\bibliographystyle{%s} bibfile bibstyle)) ad-do-it))) (ad-activate 'org-latex-keyword) in my personal Org mode setup. However, it does not work. The advice is called and returns the string, but somehow it is not inserted in the buffer. If I do the same thing in ox-latex.el:org-latex-keyword function, it does work. Any idea why ? You need to set `ad-return-value' somewhere, don't you? Regards, -- Nicolas Goaziou
Re: [O] Bibliography
Since it is back-end dependent, why don't you use: #+latex: \bibliography{...}\bibilographystyle{...} instead? To avoid duplication. Org-bibtex/reftex need the line: #+bibliography: foo plain You need to set `ad-return-value' somewhere, don't you? :-) This is what I was looking for. Thanks a lot! Fabrice
Re: [O] Bibliography
Fabrice Popineau fabrice.popin...@supelec.fr writes: Since it is back-end dependent, why don't you use: #+latex: \bibliography{...}\bibilographystyle{...} instead? To avoid duplication. Org-bibtex/reftex need the line: #+bibliography: foo plain OK. Then, it may indeed be wise to support #+bibliography in latex back-end. My only concern is about users expecting the keyword to be recognized in other back-ends. Regards, -- Nicolas Goaziou
Re: [O] Bibliography
My only concern is about users expecting the keyword to be recognized in other back-ends. Yes please. I am waiting for something that will export bibtex to html. With the old exporter, org-exp-bibtex used bibtex2html to achieve it. But nothing similar is possible with the new exporter. Vikas