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  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-04 Thread Nick Dokos
John Hendy  wrote:

> On Thu, Nov 3, 2011 at 12:55 PM, suvayu ali  
> wrote:
> > On Thu, Nov 3, 2011 at 18:48, John Hendy  wrote:
> >> On Wed, Nov 2, 2011 at 5:30 AM, suvayu ali  
> >> wrote:
> >>> On Wed, Nov 2, 2011 at 03:43, suvayu ali  
> >>> 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-03 Thread John Hendy
On Thu, Nov 3, 2011 at 12:55 PM, suvayu ali  wrote:
> On Thu, Nov 3, 2011 at 18:48, John Hendy  wrote:
>> On Wed, Nov 2, 2011 at 5:30 AM, suvayu ali  
>> wrote:
>>> On Wed, Nov 2, 2011 at 03:43, suvayu ali  
>>> 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-03 Thread suvayu ali
On Thu, Nov 3, 2011 at 18:48, John Hendy  wrote:
> On Wed, Nov 2, 2011 at 5:30 AM, suvayu ali  
> wrote:
>> On Wed, Nov 2, 2011 at 03:43, suvayu ali  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 Wed, Nov 2, 2011 at 5:30 AM, suvayu ali  wrote:
> On Wed, Nov 2, 2011 at 03:43, suvayu ali  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-02 Thread suvayu ali
On Wed, Nov 2, 2011 at 03:43, suvayu ali  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.



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