emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* First attempt at exporting to PDF.
@ 2014-05-03 15:55 Sharon Kimble
  2014-05-03 17:32 ` Martin Schöön
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Sharon Kimble @ 2014-05-03 15:55 UTC (permalink / raw)
  To: org-mode

[-- Attachment #1: Type: text/plain, Size: 2312 bytes --]

I've spent most of the day writing something in org-mode and then
exporting it to PDF. But, it doesn't come out as I wanted,
presumably because I've not got the org-mode/latex headers right,
but this is what I have -
--8<---------------cut here---------------start------------->8---
-*- Mode:org; mode:reftex; coding:utf-8  -*-
# 
#+LINK: notes #%s
\bibliography{~/.emacs.d/research/refs.bib}
#% Title


\tableofcontents
--8<---------------cut here---------------end--------------->8---
First off, it seems to be taking its title from what the file is
saved as, but I need something different from that, so how do I get
it please? "\Title The foobar mystery?", but that doesn't seem to
work either. And I need to have two people listed as the authors,
but it only seems to be taking me, so how do I do it then please?

Secondly, none of my bibliographic references show in the pdf except
as "?", although I cite them like this
--8<---------------cut here---------------start------------->8---
males have more testosterone \cite{6}.
--8<---------------cut here---------------end--------------->8---
which correlates with this -
--8<---------------cut here---------------start------------->8---
@Article{,
  author = 		 {MacRae K. Pattison J.},
  title = 		 {Home chemotherapy.},
  journaltitle = {Nursing Times},
  ALTyear = 	 {2002},
  OPTkey = 		 {6},
  OPTvolume = 	 {98},
  OPTnumber = 	 {35},
  OPTpages = 	 {34-35},
}
--8<---------------cut here---------------end--------------->8---
So how do I get the references to show in the pdf please?

This shows in the *pdf output log*
--8<---------------cut here---------------start------------->8---
LaTeX Warning: Citation `6' on page 3 undefined on input line 146.
--8<---------------cut here---------------end--------------->8---
but it is defined in the biblatex "refs.bib" file. So how do I get
them to both agree and recognise each other please?

I'll meanwhile trawl through the emails that I've saved from this
group trying to find some working headers, but any tutorials or conf
files gratefully received.

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.18

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: First attempt at exporting to PDF.
  2014-05-03 15:55 First attempt at exporting to PDF Sharon Kimble
@ 2014-05-03 17:32 ` Martin Schöön
  2014-05-03 19:05   ` Sharon Kimble
  2014-05-03 17:41 ` Nick Dokos
  2014-05-05 16:47 ` Eric S Fraga
  2 siblings, 1 reply; 8+ messages in thread
From: Martin Schöön @ 2014-05-03 17:32 UTC (permalink / raw)
  To: org-mode

[-- Attachment #1: Type: text/plain, Size: 761 bytes --]

Here is how my first org-mode file for export to pdf using LaTeX starts:

#+LATEX_CLASS: article
#+LATEX_CLASS_OPTIONS: [a4paper]
#+OPTIONS: toc:nil
#+OPTIONS: ^:{}
#+TITLE: Ett första försök att blanda in LaTeX i en Org-mod fil
#+AUTHOR: Martin Schöön

The first two rows should be self explaining and they show the syntax.
The third row prevents the creation of a table of contents.
The fourth row forces me to use the LaTeX convention of ^{something}
and _{something} for super- and sub-scripts.
Line five and six show you how to define title and author.

I have never tried what you are trying to do with references so someone
else must step in and help you there.

-- 
Martin Schöön

http://hem.bredband.net/b262106/index.html

[-- Attachment #2: Type: text/html, Size: 1158 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: First attempt at exporting to PDF.
  2014-05-03 15:55 First attempt at exporting to PDF Sharon Kimble
  2014-05-03 17:32 ` Martin Schöön
@ 2014-05-03 17:41 ` Nick Dokos
  2014-05-05 16:47 ` Eric S Fraga
  2 siblings, 0 replies; 8+ messages in thread
From: Nick Dokos @ 2014-05-03 17:41 UTC (permalink / raw)
  To: emacs-orgmode

Sharon Kimble <boudiccas@skimble.plus.com> writes:

> I've spent most of the day writing something in org-mode and then
> exporting it to PDF. But, it doesn't come out as I wanted,
> presumably because I've not got the org-mode/latex headers right,
> but this is what I have -
> -*- Mode:org; mode:reftex; coding:utf-8  -*-
> # 
> #+LINK: notes #%s
> \bibliography{~/.emacs.d/research/refs.bib}
> #% Title
>
>
> \tableofcontents
> First off, it seems to be taking its title from what the file is
> saved as, but I need something different from that, so how do I get
> it please? "\Title The foobar mystery?", but that doesn't seem to
> work either. And I need to have two people listed as the authors,
> but it only seems to be taking me, so how do I do it then please?
>

--8<---------------cut here---------------start------------->8---
#+TITLE: The foobar mystery?
#+AUTHOR: A.U. Thor and S. Kimble

* foo
bar

* baz
--8<---------------cut here---------------end--------------->8---

and you get the TOC automatically - if you don't want it, say

#+OPTIONS: toc:nil

The options are documented in

    (info "(org) Export settings")


> ...
>
> I'll meanwhile trawl through the emails that I've saved from this
> group trying to find some working headers, but any tutorials or conf
> files gratefully received.
>

A long time ago, I used to save messages from the list but no longer.  I
search through the list at gmane.org. A convenient starting point is

    http://orgmode.org/community.html

-- 
Nick

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: First attempt at exporting to PDF.
  2014-05-03 17:32 ` Martin Schöön
@ 2014-05-03 19:05   ` Sharon Kimble
  2014-05-03 20:00     ` Thomas S. Dye
  0 siblings, 1 reply; 8+ messages in thread
From: Sharon Kimble @ 2014-05-03 19:05 UTC (permalink / raw)
  To: Martin Schöön; +Cc: org-mode

[-- Attachment #1: Type: text/plain, Size: 1156 bytes --]

Martin Schöön <martin.schoon@gmail.com> writes:

> Here is how my first org-mode file for export to pdf using LaTeX
> starts:
>
> #+LATEX_CLASS: article
> #+LATEX_CLASS_OPTIONS: [a4paper]
> #+OPTIONS: toc:nil
> #+OPTIONS: ^:{}
> #+TITLE: Ett första försök att blanda in LaTeX i en Org-mod fil
> #+AUTHOR: Martin Schöön
>
> The first two rows should be self explaining and they show the syntax.
> The third row prevents the creation of a table of contents.
> The fourth row forces me to use the LaTeX convention of ^{something}
> and _{something} for super- and sub-scripts.
> Line five and six show you how to define title and author.

Thanks for this, I've now just created a PDF with your headings, and
apart from the lack of references it looks good! :)
>
> I have never tried what you are trying to do with references so
> someone
> else must step in and help you there.

Just hope someone steps up to the plate?

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.18

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: First attempt at exporting to PDF.
  2014-05-03 19:05   ` Sharon Kimble
@ 2014-05-03 20:00     ` Thomas S. Dye
  2014-05-03 20:11       ` John Kitchin
  0 siblings, 1 reply; 8+ messages in thread
From: Thomas S. Dye @ 2014-05-03 20:00 UTC (permalink / raw)
  To: Sharon Kimble; +Cc: Martin Schöön, org-mode

Aloha Sharon,

Sharon Kimble <boudiccas@skimble.plus.com> writes:

>> I have never tried what you are trying to do with references so
>> someone
>> else must step in and help you there.
>
> Just hope someone steps up to the plate?

This was written for the old exporter, but it might be useful to you:

http://orgmode.org/worg/org-tutorials/org-latex-export.html#sec-17

Also, the BibTeX entry in your original post was mal-formed.  It lacked
a key and the author field looked wrong, IIRC.  You might want to check out
the BibTeX file format:

http://www.bibtex.org/Format/

hth,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: First attempt at exporting to PDF.
  2014-05-03 20:00     ` Thomas S. Dye
@ 2014-05-03 20:11       ` John Kitchin
  2014-05-04  8:05         ` Sharon Kimble
  0 siblings, 1 reply; 8+ messages in thread
From: John Kitchin @ 2014-05-03 20:11 UTC (permalink / raw)
  To: Thomas S. Dye; +Cc: Martin Schöön, org-mode, Sharon Kimble

[-- Attachment #1: Type: text/plain, Size: 1786 bytes --]

you should be able to get references with \cite{key1} and \cite{key2}.
where key1 and key2 are bibtex keys in a bibtex file called references.bib.

you need at the end of your org-file where you want the bibliography to
appear:

\bibliographystyle{unsrt}
\bibliography{references}


In your init file, you may need to do this:
;; for minted you must run latex with -shell-escape because it calls
pygmentize as an external program
(setq org-latex-pdf-process
      '("pdflatex -shell-escape -interaction nonstopmode -output-directory
%o %b"
        "bibtex %b"
        "pdflatex -shell-escape -interaction nonstopmode -output-directory
%o %b"
        "pdflatex -shell-escape -interaction nonstopmode -output-directory
%o %b"))

I do not think org-mode runs bibtex by default. After that you should see
the references.

John

-----------------------------------
John Kitchin
Associate Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu



On Sat, May 3, 2014 at 4:00 PM, Thomas S. Dye <tsd@tsdye.com> wrote:

> Aloha Sharon,
>
> Sharon Kimble <boudiccas@skimble.plus.com> writes:
>
> >> I have never tried what you are trying to do with references so
> >> someone
> >> else must step in and help you there.
> >
> > Just hope someone steps up to the plate?
>
> This was written for the old exporter, but it might be useful to you:
>
> http://orgmode.org/worg/org-tutorials/org-latex-export.html#sec-17
>
> Also, the BibTeX entry in your original post was mal-formed.  It lacked
> a key and the author field looked wrong, IIRC.  You might want to check out
> the BibTeX file format:
>
> http://www.bibtex.org/Format/
>
> hth,
> Tom
>
> --
> Thomas S. Dye
> http://www.tsdye.com
>
>

[-- Attachment #2: Type: text/html, Size: 2847 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: First attempt at exporting to PDF.
  2014-05-03 20:11       ` John Kitchin
@ 2014-05-04  8:05         ` Sharon Kimble
  0 siblings, 0 replies; 8+ messages in thread
From: Sharon Kimble @ 2014-05-04  8:05 UTC (permalink / raw)
  To: John Kitchin; +Cc: Martin Schöön, org-mode, Thomas S. Dye

[-- Attachment #1: Type: text/plain, Size: 4725 bytes --]

Thanks for this John, replies in line -
John Kitchin <jkitchin@andrew.cmu.edu> writes:

> you should be able to get references with \cite{key1} and \cite{key2}.
> where key1 and key2 are bibtex keys in a bibtex file called
> references.bib.

I now have references showing in the document as "[\cite{10}]" where
10 is a specified entry in the "references.bib" database. I've put
it in square brackets so that when it appears in the document then
it appears as [10].

Having these as headers helps too
--8<---------------cut here---------------start------------->8---
# -*- mode:org; mode:reftex; indent-tabs-mode:nil; tab-width:2 -*-
#+STARTUP: content
#+LATEX_CLASS: article
#+LATEX_CLASS_OPTIONS: [a4paper]
#+OPTIONS: toc:t
#+OPTIONS: ^:{}
#+TITLE: The custard pie mystery.
#+AUTHOR: Sharon Kimble & Sarah ?
#+LINK: notes #%s
#+LATEX_HEADER: \usepackage[hyperref,x11names]{xcolor}
#+LATEX_HEADER: \usepackage[colorlinks=true,urlcolor=SteelBlue4,linkcolor=Firebrick4]{hyperref}
#+LaTeX_HEADER: \usepackage[backend=biber,style=verbose]{biblatex}
#+LaTeX_HEADER: \bibliography{/home/boudiccas/.emacs.d/research/references.bib}
#+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
--8<---------------cut here---------------end--------------->8---


> you need at the end of your org-file where you want the bibliography
> to appear:
>
> \bibliographystyle{unsrt}
> \bibliography{references}

I have
--8<---------------cut here---------------start------------->8---
* Bibliography
\bibliographystyle{plain}
\bibliography{references}
--8<---------------cut here---------------end--------------->8---
But all it shows in the pdf is
╭────
│* Bibliography
│
│references
╰────

>
> In your init file, you may need to do this:
> ;; for minted you must run latex with -shell-escape because it calls
> pygmentize as an external program
> (setq org-latex-pdf-process
> '("pdflatex -shell-escape -interaction nonstopmode -output-directory
> %o %b"
> "bibtex %b"
> "pdflatex -shell-escape -interaction nonstopmode -output-directory %o
> %b"
> "pdflatex -shell-escape -interaction nonstopmode -output-directory %o
> %b"))
>
> I do not think org-mode runs bibtex by default. After that you should
> see the references.

I'm not sure what you mean by "minted" but I've included it in my
"setup-testbed.el" at the end, where all new testing code goes, but
I don't see what difference its made.

This is one of the bibliographic references from its database
--8<---------------cut here---------------start------------->8---
@Article{,
  author = 		 {MacRae K. Pattison J.},
  title = 		 {Home chemotherapy.},
  journaltitle = {Nursing Times},
  ALTyear = 	 {2002},
  OPTkey = 		 {8},
  OPTvolume = 	 {98},
  OPTnumber = 	 {35},
  OPTpages = 	 {34-35},
}
--8<---------------cut here---------------end--------------->8---
Where 'key' is actually displayed as "OPTkey", does that make a
difference please?

Thanks
Sharon.
>
> John
>
> -----------------------------------
> John Kitchin
> Associate Professor
> Doherty Hall A207F
> Department of Chemical Engineering
> Carnegie Mellon University
> Pittsburgh, PA 15213
> 412-268-7803
> http://kitchingroup.cheme.cmu.edu
>
> On Sat, May 3, 2014 at 4:00 PM, Thomas S. Dye <tsd@tsdye.com> wrote:
>
>     Aloha Sharon,
>     
>     
>     Sharon Kimble <boudiccas@skimble.plus.com> writes:
>     
>     >> I have never tried what you are trying to do with references so
>     >> someone
>     >> else must step in and help you there.
>     >
>     > Just hope someone steps up to the plate?
>     
>     
>     This was written for the old exporter, but it might be useful to
>     you:
>     
>     http://orgmode.org/worg/org-tutorials/org-latex-export.html#sec-17
>     
>     Also, the BibTeX entry in your original post was mal-formed. It
>     lacked
>     a key and the author field looked wrong, IIRC. You might want to
>     check out
>     the BibTeX file format:
>     
>     http://www.bibtex.org/Format/
>     
>     hth,
>     Tom
>     
>     --
>     Thomas S. Dye
>     http://www.tsdye.com
>     
>     
>
>

-- 
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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: First attempt at exporting to PDF.
  2014-05-03 15:55 First attempt at exporting to PDF Sharon Kimble
  2014-05-03 17:32 ` Martin Schöön
  2014-05-03 17:41 ` Nick Dokos
@ 2014-05-05 16:47 ` Eric S Fraga
  2 siblings, 0 replies; 8+ messages in thread
From: Eric S Fraga @ 2014-05-05 16:47 UTC (permalink / raw)
  To: Sharon Kimble; +Cc: org-mode

On Saturday,  3 May 2014 at 16:55, Sharon Kimble wrote:

[...]

> Secondly, none of my bibliographic references show in the pdf except
> as "?", although I cite them like this
> males have more testosterone \cite{6}.
> which correlates with this -
> @Article{,

Your problem (both in this email and in the other thread you have
started related to bibtex) is that you have not given the bibtex entry a
label.  This is the bit that goes between the "{" and the "," in the
line above and is what is used to "cite" the article in LaTeX.  

You should have something like this:

  @Article{paperbyjoebloggs2014,
  [...]
  }
  
which you then refer to in your LaTeX with \cite{paperbyjoebloggs2014}.

If you sort this out, you will find that everything else should be fine
(given the various emails in this and the other thread).

>   author = 		 {MacRae K. Pattison J.},
>   title = 		 {Home chemotherapy.},
>   journaltitle = {Nursing Times},
>   ALTyear = 	 {2002},
>   OPTkey = 		 {6},
>   OPTvolume = 	 {98},
>   OPTnumber = 	 {35},
>   OPTpages = 	 {34-35},

I assume you have been using bibtex mode in Emacs to define these?  If
so, you need to C-c C-c on each entry to get rid of the OPT bit
automatically.  The actual entries are key, volume, number and pages...

HTH,
eric
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.2, Org release_8.2.6-923-g233c11

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-05-05 16:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-03 15:55 First attempt at exporting to PDF Sharon Kimble
2014-05-03 17:32 ` Martin Schöön
2014-05-03 19:05   ` Sharon Kimble
2014-05-03 20:00     ` Thomas S. Dye
2014-05-03 20:11       ` John Kitchin
2014-05-04  8:05         ` Sharon Kimble
2014-05-03 17:41 ` Nick Dokos
2014-05-05 16:47 ` Eric S Fraga

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).