Re: [O] Pass LaTeX exporter option prior to \documentclass

2011-11-04 Thread Nick Dokos
John Hendy jw.he...@gmail.com wrote:

 On Thu, Nov 3, 2011 at 12:55 PM, suvayu ali fatkasuvayu+li...@gmail.com 
 wrote:
  On Thu, Nov 3, 2011 at 18:48, John Hendy jw.he...@gmail.com wrote:
  On Wed, Nov 2, 2011 at 5:30 AM, suvayu ali fatkasuvayu+li...@gmail.com 
  wrote:
  On Wed, Nov 2, 2011 at 03:43, suvayu ali fatkasuvayu+li...@gmail.com 
  wrote:
  You could try replacing that with the following:
 
  pdflatex -interaction nonstopmode -output-directory %o
  \pdfminorversion=4 $(cat %f)
 
  I did some testing. The following should work.
 
  pdflatex -interaction nonstopmode -output-directory %o
  \\pdfminorversion=4 \\input{%f}
 
  Thanks for the workaround! So, to be clear, I'd type in what you wrote
  when I'm prompted for the command to use after =C-c C-e p=?
 
  No. I don't think org prompts for the command when exporting. You
  should use customize to set the variable org-latex-to-pdf-process to
  the above command.
 
 
 Ah, sorry. You're right. I was thinking of =C-c C-c= from the .tex file 
 buffer.
 
 Thanks again! It was a fringe scenario for sure!
 
 

Alternatively, you can define a new entry in org-export-latex-classes
that does what you want - I just cribbed the existing beamer entry and
modified it a bit (I had called it beamerpdf14 at first, but apparently
numerics are not allowed):

,
| (require 'org-latex)
| (setq beamerpdf  '(beamerpdf \\pdfminorversion=4\\documentclass{beamer} 
org-beamer-sectioning))
| (add-to-list 'org-export-latex-classes beamerpdf t)
`

and then set

#+LATEX_CLASS: beamerpdf

in your org file.

Nick



Re: [O] Pass LaTeX exporter option prior to \documentclass

2011-11-04 Thread suvayu ali
Hi John,

On Fri, Nov 4, 2011 at 18:29, Nick Dokos nicholas.do...@hp.com wrote:
 Alternatively, you can define a new entry in org-export-latex-classes
 that does what you want - I just cribbed the existing beamer entry and
 modified it a bit (I had called it beamerpdf14 at first, but apparently
 numerics are not allowed):

 ,
 | (require 'org-latex)
 | (setq beamerpdf  '(beamerpdf \\pdfminorversion=4\\documentclass{beamer} 
 org-beamer-sectioning))
 | (add-to-list 'org-export-latex-classes beamerpdf t)
 `

 and then set

 #+LATEX_CLASS: beamerpdf

 in your org file.

For the record, I would say Nick's solution is a more flexible setup.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Pass LaTeX exporter option prior to \documentclass

2011-11-03 Thread John Hendy
On Wed, Nov 2, 2011 at 5:30 AM, suvayu ali fatkasuvayu+li...@gmail.com wrote:
 On Wed, Nov 2, 2011 at 03:43, suvayu ali fatkasuvayu+li...@gmail.com wrote:
 You could try replacing that with the following:

 pdflatex -interaction nonstopmode -output-directory %o
 \pdfminorversion=4 $(cat %f)

 I did some testing. The following should work.

 pdflatex -interaction nonstopmode -output-directory %o
 \\pdfminorversion=4 \\input{%f}

Thanks for the workaround! So, to be clear, I'd type in what you wrote
when I'm prompted for the command to use after =C-c C-e p=?

John


 Using tex commands is probably better than shell expansion.

 --
 Suvayu

 Open source is the future. It sets us free.




Re: [O] Pass LaTeX exporter option prior to \documentclass

2011-11-03 Thread suvayu ali
On Thu, Nov 3, 2011 at 18:48, John Hendy jw.he...@gmail.com wrote:
 On Wed, Nov 2, 2011 at 5:30 AM, suvayu ali fatkasuvayu+li...@gmail.com 
 wrote:
 On Wed, Nov 2, 2011 at 03:43, suvayu ali fatkasuvayu+li...@gmail.com wrote:
 You could try replacing that with the following:

 pdflatex -interaction nonstopmode -output-directory %o
 \pdfminorversion=4 $(cat %f)

 I did some testing. The following should work.

 pdflatex -interaction nonstopmode -output-directory %o
 \\pdfminorversion=4 \\input{%f}

 Thanks for the workaround! So, to be clear, I'd type in what you wrote
 when I'm prompted for the command to use after =C-c C-e p=?

No. I don't think org prompts for the command when exporting. You
should use customize to set the variable org-latex-to-pdf-process to
the above command.

GL

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Pass LaTeX exporter option prior to \documentclass

2011-11-03 Thread John Hendy
On Thu, Nov 3, 2011 at 12:55 PM, suvayu ali fatkasuvayu+li...@gmail.com wrote:
 On Thu, Nov 3, 2011 at 18:48, John Hendy jw.he...@gmail.com wrote:
 On Wed, Nov 2, 2011 at 5:30 AM, suvayu ali fatkasuvayu+li...@gmail.com 
 wrote:
 On Wed, Nov 2, 2011 at 03:43, suvayu ali fatkasuvayu+li...@gmail.com 
 wrote:
 You could try replacing that with the following:

 pdflatex -interaction nonstopmode -output-directory %o
 \pdfminorversion=4 $(cat %f)

 I did some testing. The following should work.

 pdflatex -interaction nonstopmode -output-directory %o
 \\pdfminorversion=4 \\input{%f}

 Thanks for the workaround! So, to be clear, I'd type in what you wrote
 when I'm prompted for the command to use after =C-c C-e p=?

 No. I don't think org prompts for the command when exporting. You
 should use customize to set the variable org-latex-to-pdf-process to
 the above command.


Ah, sorry. You're right. I was thinking of =C-c C-c= from the .tex file buffer.

Thanks again! It was a fringe scenario for sure!


John

 GL

 --
 Suvayu

 Open source is the future. It sets us free.




Re: [O] Pass LaTeX exporter option prior to \documentclass

2011-11-02 Thread suvayu ali
On Wed, Nov 2, 2011 at 03:43, suvayu ali fatkasuvayu+li...@gmail.com wrote:
 You could try replacing that with the following:

 pdflatex -interaction nonstopmode -output-directory %o
 \pdfminorversion=4 $(cat %f)

I did some testing. The following should work.

pdflatex -interaction nonstopmode -output-directory %o
\\pdfminorversion=4 \\input{%f}

Using tex commands is probably better than shell expansion.

-- 
Suvayu

Open source is the future. It sets us free.



[O] Pass LaTeX exporter option prior to \documentclass

2011-11-01 Thread John Hendy
Hi,

I'm creating a beamer presentation and screencasting a walkthrough of
it for work. I wanted to use impress!ve, but was getting errors about
there being no pages in the document. [1] In looking this error up, it
seems that impressive requires pdf version 1.4, which can be passed
with this:

\pdfminorversion=4

Unfortunately, exporting via Orgmode causes this error with that command:

,---
| ! pdfTeX error (setup): \pdfminorversion cannot be changed after data is
| written to the PDF file.
`---

In searching that error, I found the 1.4 documentation, which states:[2]

,---
| it probably means that some package loaded before pdf14 did write
data to the PDF file.
| In case the document class is (indirectly) doing it, you’ll need to
load pdf14 even before the
| \documentclass command, using \RequirePackage{pdf14} as the first
line of your source file.
`---

Using this suggestion solves my problem.

There doesn't seem to be a way to get this as the first line via
Orgmode; I have to export and then go to the .tex file directly to
change it. Any suggestions? I realize this is a pretty fringe case. If
it's one where it's just not worth it to implement something if
nothing already exists, that's completely acceptable to me. I just
thought I'd bring it up! It's primarily a nuisance because impressive
hasn't been updated in about a year. I wouldn't normally use it, but
the ability to zoom, use a spotlight for the mouse, and so on are
just really neat for something like this.

[1] http://impressive.sourceforge.net/
[2] ftp://152.19.134.44/CTAN/macros/latex/contrib/pdf14/pdf14.pdf


Thanks,
John



Re: [O] Pass LaTeX exporter option prior to \documentclass

2011-11-01 Thread suvayu ali
Hi John,

On Wed, Nov 2, 2011 at 03:22, John Hendy jw.he...@gmail.com wrote:

 I'm creating a beamer presentation and screencasting a walkthrough of
 it for work. I wanted to use impress!ve, but was getting errors about
 there being no pages in the document. [1] In looking this error up, it
 seems that impressive requires pdf version 1.4, which can be passed
 with this:

 \pdfminorversion=4


Disclaimer: What follows is an extremely hacky untested solution using
some shell foo.

By default org-latex-to-pdf-process is bound to something like this:

pdflatex -interaction nonstopmode -output-directory %o %f

You could try replacing that with the following:

pdflatex -interaction nonstopmode -output-directory %o
\pdfminorversion=4 $(cat %f)

Hope this helps.

-- 
Suvayu

Open source is the future. It sets us free.