Re: [Orgmode] questions about exporting to latex using beamer documentclass

2009-07-06 Thread Carsten Dominik


On Jul 5, 2009, at 6:40 PM, Nick Dokos wrote:


Spike Spiegel fsm...@gmail.com wrote:


...
Also, given a variable like org-export-latex-image-default-option, is
there any way to override it per file or per document class?
...


Well, yes and no (mostly no - but see below):

o You can of course customize this variable, but that's a global  
setting.


o You can use the :latex-image-options property to set the above  
variable,
 but that is used in org-publish-project-alist, not for exporting.  
From org-exp.el:


,
| (defconst org-export-plist-vars
|   '((:link-up   nil org-export-html-link-up)
|
| ...
|
| (:latex-image-options nil	  org-export-latex-image-default- 
option))

|   List of properties that represent export/publishing variables.
| Each element is a list of 3 items:
| 1. The property that is used internally, and also for org-publish- 
project-alist
| 2. The string that can be used in the OPTION lines to set this  
option,

|or nil if this option cannot be changed in this way
| 3. The customization variable that sets the default for this  
option.

| )
`

o You can modify the setting of the org-export-plist-vars (either by  
modifying your copy

 of org-exp.el or by some other method) to change the line

(:latex-image-options nil	  org-export-latex-image-default- 
option))


 to

(:latex-image-options latex-image-options	  org-export- 
latex-image-default-option))


 and then use

 #+OPTIONS: latex-image-options:width=1 cm

 in your org file.

 [BTW, if you are using git, small local variations from the  
canonical org-mode can be easily

  accommodated, by using a local branch and git rebase.]

o You can try to convince Carsten that this should be part of  
canonical org-mode.


You can now do (I think)

#+BIND: org-export-latex-image-default-option width=1cm

This will work for any variables that are not addressed by
#+OPTIONS and similar lines.  It will not work for anything
that is in `org-export-plist-vars', and that is confusing.
Any ideas on how these should interact?

- Carsten



HTH,
Nick


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode




___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] questions about exporting to latex using beamer documentclass

2009-07-05 Thread Spike Spiegel
Hi Nicholas,

On Sun, Jul 5, 2009 at 4:40 AM, Nick Dokosnicholas.do...@hp.com wrote:
 Spike Spiegel fsm...@gmail.com wrote:

 ...
 - I also need to include an image in the titlepage but I don't see any
 way to override \maketitle other than maybe renewcommand'ing it, which
 I tried with #+LaTeX_HEADER, but kept getting errors, altho that might
 have been me. While poking around I noticed
 org-export-latex-title-command in org-latex.el but I'm unsure how I'd
 use that to achieve my goal.


 This can be done using beamer's \titlegraphic command. Add

 #+LaTeX_HEADER: \titlegraphic{\includegraphics{foo.png}}


Both answers spot on, thanks, with just a minor problem: adding
\titlegraphic won't make the spacing between \title \author \data as
produced by \maketitle shrink so the entire slide is pretty much used
up and the image doesn't fit in. Is there a way to override that?

Wrt your reply in pvt to my other question, sorry if I wasn't clear.
Your suggestion of using \includegraphics straight into the heading
works just fine, my issue is that I was trying to do it the org way
and use a link (as in C-u C-c C-l) which would have then requried a
#+ATTR_LaTeX header to pass in the width parameter.

I did some more work last night and came across another issues:
- #BEGIN_VERBATIM won't work because to use the \begin{verbatim}
environment the \being{frame} requires [fragile]

Also, given a variable like org-export-latex-image-default-option, is
there any way to override it per file or per document class?

Last thing, if you're gonna use latex commands requiring paths to
files, how do you insert the path? using C-u C-l isn't really an
option as that will add a link and not just the path to the file so
then you have to delete the [[ ]].

thanks again for all the help

-- 
Behind every great man there's a great backpack - B.


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] questions about exporting to latex using beamer documentclass

2009-07-05 Thread Nick Dokos
Spike Spiegel fsm...@gmail.com wrote:


  #+LaTeX_HEADER: \titlegraphic{\includegraphics{foo.png}}
 
 
 Both answers spot on, thanks, with just a minor problem: adding
 \titlegraphic won't make the spacing between \title \author \data as
 produced by \maketitle shrink so the entire slide is pretty much used
 up and the image doesn't fit in. Is there a way to override that?
 

Yes - you should read sec. 16.3 (on templates) of the Beamer User Guide.
You can redefine the title page template and format the title page any
way you wish (within limits of course: it all has to fit on one slide).

For example, try adding this to the preamble (note that I made the image 
bigger, but
if it doesn't fit, you can use the same method to make it smaller):

,
| \titlegraphic{\begin{center}\includegraphics[width=5cm]{foo.png}\end{center}}
| 
| \title{Example presentation}
| \author{Nick Dokos \\ 
$$\href{mailto:nicholas.do...@hp.com}{nicholas.dokos@hp.com}$$}
| \date{04 July 2009}
| 
| \setbeamertemplate{title page}{
|  \centering{
|   
\inserttitle\inserttitle\inserttitle\inserttitle\inserttitle\inserttitle\inserttitle\inserttitle
 \\
|   \insertauthor \\
|   \insertdate \\
|   \inserttitlegraphic}}
`

You might also try asking questions about beamer on comp.text.tex (after
all, this has nothing to do with org-mode). I don't know if Till Tantau
hangs out there any longer, but you are still much more likely to get
answers to such questions there.

HTH,
Nick


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] questions about exporting to latex using beamer documentclass

2009-07-05 Thread Nick Dokos
Spike Spiegel fsm...@gmail.com wrote:

 ...
 I did some more work last night and came across another issues:
 - #BEGIN_VERBATIM won't work because to use the \begin{verbatim}
 environment the \being{frame} requires [fragile]
 

I worked around this when working on my presentation by putting verbatim stuff
in a file and using \verbatiminput:

,
| #+LaTeX_CLASS: beamer
| #+TITLE: Example presentation
| #+AUTHOR: Nick Dokos \\ 
$$\href{mailto:nicholas.do...@hp.com}{nicholas.dokos@hp.com}$$
| #+EMAIL: nicholas.do...@hp.com
| #+OPTIONS: toc:nil H:2
| #+LaTeX_HEADER: \titlegraphic{\includegraphics{foo.png}}
| * Why \includegraphics[width=5cm]{foo.png}
| ** Reason 1.
|Text explaining reason #1.
| ** Reason 2.
|... more explanations.
| ** Reason 3.
|Blah, blah, blah.
|  
| ** Reason 4.
|Why not?
| 
| * What
| ** First piece.
| #+LaTeX: \verbatiminput{foo.1}
| ** Second piece.
| #+LaTeX: \verbatiminput{foo.2}
| ** Third piece.
| ** Fourth piece.
`

HTH,
Nick


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] questions about exporting to latex using beamer documentclass

2009-07-05 Thread Nick Dokos
Spike Spiegel fsm...@gmail.com wrote:

 ... 
 Also, given a variable like org-export-latex-image-default-option, is
 there any way to override it per file or per document class?
 ... 

Well, yes and no (mostly no - but see below):

o You can of course customize this variable, but that's a global setting.

o You can use the :latex-image-options property to set the above variable,
  but that is used in org-publish-project-alist, not for exporting. From 
org-exp.el:

,
| (defconst org-export-plist-vars
|   '((:link-up   nil org-export-html-link-up)
| 
| ...
| 
| (:latex-image-options nil   
org-export-latex-image-default-option))
|   List of properties that represent export/publishing variables.
| Each element is a list of 3 items:
| 1. The property that is used internally, and also for 
org-publish-project-alist
| 2. The string that can be used in the OPTION lines to set this option,
|or nil if this option cannot be changed in this way
| 3. The customization variable that sets the default for this option.
| )
`

o You can modify the setting of the org-export-plist-vars (either by modifying 
your copy
  of org-exp.el or by some other method) to change the line

 (:latex-image-options nil
org-export-latex-image-default-option))

  to

 (:latex-image-options latex-image-options  
org-export-latex-image-default-option))

  and then use

 #+OPTIONS: latex-image-options:width=1cm

  in your org file.

  [BTW, if you are using git, small local variations from the canonical 
org-mode can be easily
   accommodated, by using a local branch and git rebase.]

o You can try to convince Carsten that this should be part of canonical 
org-mode.

HTH,
Nick


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Nick Dokos: Re: [Orgmode] questions about exporting to latex using beamer documentclass

2009-07-05 Thread Nick Dokos
Apologies - I did a Reply, instead of Reply all. Spike, thanks for pointing
out the omission.

--- Forwarded Message

Date:Sun, 05 Jul 2009 00:24:42 -0400
From:Nick Dokos nicholas.do...@hp.com
To:  Spike Spiegel fsm...@gmail.com
cc:  nicholas.do...@hp.com
Subject: Re: [Orgmode] questions about exporting to latex using beamer document
  class

Spike Spiegel fsm...@gmail.com wrote:

 ...
 - I'm in the situation that I need to pass options to an image
 (\includegraphics) in a frame's title (frames are beamer's idea of
 slide). Based on the docs it seems I should be doing something like
 #+ATTR_LaTeX: width=5cm,angle=90 but I can't put that within a
 headline before the image and it won't work if I put it before it
 because it'll end up outside of the frame

I'm afraid I don't quite understand your description. Can you provide a bit
more detail about what you are  trying to do and how you are going about it?

Here's how I interpreted your description of adding an image to a frame's title
(see the Why headline below - note that I use a slightly different setup for 
beamer
as described in http://article.gmane.org/gmane.emacs.orgmode/15126).

,
| #+LaTeX_CLASS: beamer
| #+TITLE: Example presentation
| #+AUTHOR: Nick Dokos \\ $$\href{mailto:nicholas.do...@hp.com}{nicholas.dokos
@hp.com}$$
| #+EMAIL: nicholas.do...@hp.com
| #+OPTIONS: toc:nil H:2
| #+LaTeX_HEADER: \titlegraphic{\includegraphics{foo.png}}
| * Why \includegraphics[width=5cm]{foo.png}
| ** Reason 1.
|Text explaining reason #1.
| ** Reason 2.
|... more explanations.
| ** Reason 3.
|Blah, blah, blah.
|  
| ** Reason 4.
|Why not?
| 
| * What
| ** First piece.
| ** Second piece.
| ** Third piece.
| ** Fourth piece.
`

I can pass optional parameters just fine as shown above. But I'm not
sure whether this is really what you want.

Thanks,
Nick


--- End of Forwarded Message



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] questions about exporting to latex using beamer documentclass

2009-07-05 Thread Russell Adams
Here's how I use prosper, follow the examples below. After exporting
to tex, you must use the latex command (not pdflatex), followed by dvipdf.

Enjoy!

~/.emacs:

(setq org-export-latex-classes (cons '(prosper
% BEGIN Prosper Defaults
\\documentclass[pdf, contemporain]{prosper}
\\usepackage[utf8]{inputenc}
\\usepackage[T1]{fontenc}
\\usepackage{hyperref}
\\hypersetup{colorlinks,linkcolor=blue}
% END Prosper Defaults


(\\begin{slide}{%s}
\\end{slide}
\\begin{slide}{%s}
\\end{slide}))
org-export-latex-classes))

Ledger.org (see http://adamsinfoserv.com/ under Presentations):

#+LaTeX_CLASS: prosper
#+TITLE: Ledger  CLI Accounting
#+AUTHOR:Russell Adams
#+EMAIL: rlad...@adamsinfoserv.com
#+DATE:  2009-06-27
#+OPTIONS:   H:3 num:nil toc:nil \n:t @:t ::t |:t ^:nil -:t f:t *:t :t
#+OPTIONS:   TeX:nil LaTeX:nil skip:nil d:nil todo:t pri:nil tags:not-in-toc

* Slide

 - Item
 - Item
 - Item

* COMMENT Local Vars

#+ Local Variables:
#+ org-export-latex-title-command: 
#+ End:


--
Russell Adamsrlad...@adamsinfoserv.com

PGP Key ID: 0x1160DCB3   http://www.adamsinfoserv.com/

Fingerprint:1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] questions about exporting to latex using beamer documentclass

2009-07-04 Thread Nick Dokos
Spike Spiegel fsm...@gmail.com wrote:

 ...

 On a side note, a little feature request: would it be possible to
 produce an indented tex file? post editing is otherwise quite painful
 

Try
 C-x h C-M-\ 

or equivalently

M-x mark-whole-buffer
M-x indent-region

when editing the TeX file.

HTH,
Nick



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] questions about exporting to latex using beamer documentclass

2009-07-04 Thread Nick Dokos
Spike Spiegel fsm...@gmail.com wrote:

 ...
 - I also need to include an image in the titlepage but I don't see any
 way to override \maketitle other than maybe renewcommand'ing it, which
 I tried with #+LaTeX_HEADER, but kept getting errors, altho that might
 have been me. While poking around I noticed
 org-export-latex-title-command in org-latex.el but I'm unsure how I'd
 use that to achieve my goal.
 

This can be done using beamer's \titlegraphic command. Add

#+LaTeX_HEADER: \titlegraphic{\includegraphics{foo.png}}

to your org file.

HTH,
Nick


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode