emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Bibliography woes!


From: Sharon Kimble
Subject: Re: [O] Bibliography woes!
Date: Mon, 05 May 2014 18:08:52 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

Vikas Rawal <address@hidden> 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 3.1415926-2.5-0.9999.3 (TeX Live 2013/Debian)
 \write18 enabled.
entering extended mode
(/home/boudiccas/.emacs.d/research/cat.tex
LaTeX2e <2011/06/27>
Babel <3.9k> and hyphenation patterns for 13 languages loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))
(/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty
(/usr/share/texlive/texmf-dist/tex/latex/base/t1enc.def))
(/usr/share/texlive/texmf-dist/tex/latex/base/fixltx2e.sty)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/graphics.cfg)
(/usr/share/texlive/texmf-dist/tex/xelatex/xetex-def/xetex.def)))
(/usr/share/texlive/texmf-dist/tex/latex/tools/longtable.sty)
(/usr/share/texlive/texmf-dist/tex/latex/float/float.sty)
(/usr/share/texlive/texmf-dist/tex/latex/wrapfig/wrapfig.sty)
(/usr/share/texlive/texmf-dist/tex/latex/rotating/rotating.sty
(/usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty))
(/usr/share/texlive/texmf-dist/tex/generic/ulem/ulem.sty)
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amstext.sty
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsbsy.sty)
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsopn.sty))
(/usr/share/texlive/texmf-dist/tex/latex/base/textcomp.sty
(/usr/share/texlive/texmf-dist/tex/latex/base/ts1enc.def))
(/usr/share/texlive/texmf-dist/tex/latex/marvosym/marvosym.sty)
(/usr/share/texlive/texmf-dist/tex/latex/wasysym/wasysym.sty)
(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/amssymb.sty
(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/amsfonts.sty))
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty))
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/auxhook.sty)
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty)
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def)
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/hyperref.cfg)
(/usr/share/texlive/texmf-dist/tex/latex/url/url.sty))

Package hyperref Message: Driver (autodetected): hxetex.

(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hxetex.def
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/puenc.def)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/stringenc.sty)
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty))
(/usr/share/texlive/texmf-dist/tex/latex/libertine/libertine.sty
(/usr/share/texlive/texmf-dist/tex/latex/xkeyval/xkeyval.sty
(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/xkeyval.tex))
(/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec.sty
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/expl3.sty
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3names.sty
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3bootstrap.sty))
(/usr/share/texlive/texmf-dist/tex/latex/etex-pkg/etex.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3basics.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3expan.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3tl.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3seq.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3int.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3quark.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3prg.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3clist.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3token.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3prop.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3msg.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3file.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3skip.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3keys.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3fp.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3box.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3coffins.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3color.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3luatex.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3candidates.sty))
(/usr/share/texlive/texmf-dist/tex/latex/l3packages/xparse/xparse.sty)
(/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec-patches.sty
*************************************************
* LaTeX warning: "xparse/redefine-command"
* 
* Redefining document command \oldstylenums with arg. spec. 'm' on line 128.
*************************************************
) (/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
(/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty
(/usr/share/texlive/texmf-dist/tex/latex/euenc/eu1enc.def)
(/usr/share/texlive/texmf-dist/tex/latex/euenc/eu1lmr.fd))
(/usr/share/texlive/texmf-dist/tex/xelatex/xunicode/xunicode.sty
(/usr/share/texmf/tex/latex/tipa/t3enc.def
(/usr/share/texlive/texmf-dist/tex/latex/euenc/eu1lmss.fd)))
(/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec.cfg)))
*************************************************
* fontspec warning: "icu-feature-not-exist-in-font"
* 
* OpenType feature 'Numbers=Monospaced,Lining' (+tnum) not available for font
* 'LinLibertine_RZI' with script 'Latin' and language 'Default'.
*************************************************
*************************************************
* fontspec warning: "icu-feature-not-exist-in-font"
* 
* OpenType feature 'Numbers=Monospaced,Lining' (+tnum) not available for font
* 'LinLibertine_RZI' with script 'Latin' and language 'Default'.
*************************************************
(/usr/share/texlive/texmf-dist/tex/latex/libertine/LinLibertine_R.tex)
(/usr/share/texlive/texmf-dist/tex/latex/libertine/LinBiolinum_R.tex)
(/usr/share/texlive/texmf-dist/tex/latex/libertine/LinBiolinum_K.tex)
(/usr/share/texlive/texmf-dist/tex/latex/libertine/LinLibertine_I.tex)
(/usr/share/texlive/texmf-dist/tex/latex/libertine/LKey.tex))
(/usr/share/texlive/texmf-dist/tex/latex/xltxtra/xltxtra.sty
(/usr/share/texlive/texmf-dist/tex/latex/realscripts/realscripts.sty
*************************************************
* LaTeX warning: "xparse/redefine-command"
* 
* Redefining document command \textsubscript with arg. spec. 's' on line 25.
*************************************************
*************************************************
* LaTeX warning: "xparse/redefine-command"
* 
* Redefining document command \textsuperscript with arg. spec. 's' on line 28.
*************************************************
) (/usr/share/texlive/texmf-dist/tex/latex/metalogo/metalogo.sty))
(/usr/share/texlive/texmf-dist/tex/latex/biblatex/biblatex.sty
(/usr/share/texlive/texmf-dist/tex/latex/biblatex/biblatex2.sty
(/usr/share/texlive/texmf-dist/tex/latex/etoolbox/etoolbox.sty)
(/usr/share/texlive/texmf-dist/tex/latex/logreq/logreq.sty
(/usr/share/texlive/texmf-dist/tex/latex/logreq/logreq.def))
(/usr/share/texlive/texmf-dist/tex/latex/biblatex/blx-dm.def)
(/usr/share/texlive/texmf-dist/tex/latex/biblatex/blx-compat.def)
(/usr/share/texlive/texmf-dist/tex/latex/biblatex/biblatex.def)
(/usr/share/texlive/texmf-dist/tex/latex/biblatex/blx-natbib.def)
(/usr/share/texlive/texmf-dist/tex/latex/biblatex/bbx/authoryear.bbx
(/usr/share/texlive/texmf-dist/tex/latex/biblatex/bbx/standard.bbx))
(/usr/share/texlive/texmf-dist/tex/latex/biblatex/cbx/authoryear-icomp.cbx)
(/usr/share/texlive/texmf-dist/tex/latex/biblatex/biblatex.cfg)))
(/usr/share/texlive/texmf-dist/tex/latex/bussproofs/bussproofs.sty
Proof Tree (bussproofs) style macros. Version 1.1.
) (/usr/share/texlive/texmf-dist/tex/latex/base/makeidx.sty)
(/usr/share/texlive/texmf-dist/tex/generic/babel/babel.sty
(/usr/share/texlive/texmf-dist/tex/generic/babel-english/english.ldf
(/usr/share/texlive/texmf-dist/tex/generic/babel/babel.def
(/usr/share/texlive/texmf-dist/tex/generic/babel/xebabel.def)))
(/usr/share/texlive/texmf-dist/tex/generic/babel-english/english.ldf))

Package Babel Warning: The package option `english' should not be used
(Babel)                with a more specific one (like `british') on input line 
27.

(/usr/share/texlive/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/se-ascii-print.def)
(/usr/share/texlive/texmf-dist/tex/latex/biblatex/lbx/english.lbx)

Package biblatex Warning: 'babel/polyglossia' detected but 'csquotes' missing.
(biblatex)                Loading 'csquotes' recommended.

(.//cat.aux) (/usr/share/texlive/texmf-dist/tex/latex/base/ts1cmr.fd)
(/usr/share/texmf/tex/latex/tipa/t3cmr.fd)
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/gettitlestring.sty))
(.//cat.out) (.//cat.out) (.//cat.bbl)
(/usr/share/texlive/texmf-dist/tex/latex/wasysym/uwasy.fd)
(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsa.fd)
(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsb.fd) [1]

LaTeX Warning: Citation '1' on page 2 undefined on input line 54.


LaTeX Warning: Empty bibliography on input line 80.

[2] (./cat.aux)

LaTeX Warning: There were undefined references.


Package biblatex Warning: Please (re)run Biber on the file:
(biblatex)                cat
(biblatex)                and rerun LaTeX afterwards.

 )
(see the transcript file for additional information)
Output written on ./cat.pdf (2 pages).
Transcript written on .//cat.log.
--8<---------------cut here---------------end--------------->8---

and this is from my "setup-testbed.el"
--8<---------------cut here---------------start------------->8---
;;; XeTeX customisations
;; remove "inputenc" from default packages as it clashes with xelatex
(setf org-latex-default-packages-alist
      (remove '("AUTO" "inputenc" t) org-latex-default-packages-alist))
;; the sexp below will also work in this case. But it is not robust as it
;; pops the first element regardless if its a match or not.
;; (pop org-latex-default-packages-alist)

(add-to-list 'org-latex-packages-alist '("" "xltxtra" t))
;; choose Linux Libertine O as serif and Linux Biolinum O as sans-serif fonts
(add-to-list 'org-latex-packages-alist '("" "libertine" t))
;; commented for now as preferable to set per file for now
;; (add-to-list 'org-latex-packages-alist '("" "unicode-math" t))
;; (add-to-list 'org-latex-packages-alist
;;           "\\setmathfont{Linux Libertine}" t) ; needed for unicode-math

;; 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"
                "bibtex %b"
                "xelatex -shell-escape -interaction nonstopmode 
-output-directory %o %f"
                "bibtex %b"
                "bibtex %b"
        "xelatex -shell-escape -interaction nonstopmode -output-directory %o %f"
        "xelatex -shell-escape -interaction nonstopmode -output-directory %o 
%f"))

;; ;; export single chapter
;; (add-to-list 'org-latex-classes
;;           '("chapter" "\\documentclass[11pt]{report}"
;;             ("\\chapter{%s}" . "\\chapter*{%s}")
;;             ("\\section{%s}" . "\\section*{%s}")
;;             ("\\subsection{%s}" . "\\subsection*{%s}")
;;             ("\\subsubsection{%s}" . "\\subsubsection*{%s}")))

;; ;; FIXME: doesn't work because of \hypersetup, \tableofcontents, etc.
;; ;; minimal export with the new exporter (maybe use the standalone class?)
;; (add-to-list 'org-latex-classes
;;              '("minimal"
;;                
"\\documentclass\{minimal\}\n[NO-DEFAULT-PACKAGES]\n[NO-PACKAGES]"
;;                ("\\section\{%s\}" . "\\section*\{%s\}")
;;                ("\\subsection\{%s\}" . "\\subsection*\{%s\}")
;;                ("\\subsubsection\{%s\}" . "\\subsubsection*\{%s\}")))

(defun my-auto-tex-parameters ()
      "Automatically select the tex packages to include."
      ;; default packages for ordinary latex or pdflatex export
      (setq org-export-latex-default-packages-alist
            '(("AUTO" "inputenc" t)
              ("T1"   "fontenc"   t)
              (""     "fixltx2e"  nil)
              (""     "wrapfig"   nil)
              (""     "soul"      t)
              (""     "textcomp"  t)
              (""     "marvosym"  t)
              (""     "wasysym"   t)
              (""     "latexsym"  t)
              (""     "amssymb"   t)
              (""     "hyperref"  nil)))

      ;; Packages to include when xelatex is used
      (if (string-match "LATEX_CMD: xelatex" (buffer-string))
          (setq org-export-latex-default-packages-alist
                '(("" "fontspec" t)
                  ("" "xunicode" t)
                  ("" "url" t)
                  ("" "rotating" t)
                  ("british" "babel" t)
                  ("babel" "csquotes" t)
                  ("" "soul" t)
                  ("xetex" "hyperref" nil)
                  )))

      (if (string-match "LATEX_CMD: xelatex" (buffer-string))
          (setq org-export-latex-classes
                (cons '("article"
                        "\\documentclass[11pt,article,oneside]{memoir}"
                        ("\\section{%s}" . "\\section*{%s}")
                        ("\\subsection{%s}" . "\\subsection*{%s}")
                        ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
                        ("\\paragraph{%s}" . "\\paragraph*{%s}")
                        ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
                      org-export-latex-classes))))

(add-hook 'org-export-latex-after-initial-vars-hook 'my-auto-tex-parameters)
--8<---------------cut here---------------end--------------->8---

To create a tex file I have used "C-c C-e l l"
To create the pdf file I did "C-c C-e l p"

I've given all the information that I can such that you can use the
same files and recreate my pdf. The problems that I am finding is
the bibliography is not displayed in the pdf file, but I don't know
why. Hopefully with all of this information we can work out where
I'm going wrong?

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

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]