[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Source Code Syntax Highlighting in Beamer slides
From: |
Alexander Baier |
Subject: |
Re: [O] Source Code Syntax Highlighting in Beamer slides |
Date: |
Mon, 22 Apr 2013 01:21:47 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Suvayu Ali <address@hidden> writes:
> Hi Alexander,
>
> On Sun, Apr 21, 2013 at 09:25:55PM +0200, Alexander Baier wrote:
>>
>> I am trying to syntax-color the code in my source blocks that is
>> exported to LaTeX. As proposed in this thread [1] over a year ago I
>> followed this guide [2], but could not get the generated .tex file to
>> compile.
>
> [...chomp...chomp...chomp...]
>
>> Package ifplatform Warning:
>> shell escape is disabled, so I can only detect \ifwindows.
>>
>> )
>> address@hidden
>> address@hidden
>> address@hidden@address@hidden
>> address@hidden
>> )
>>
>> ! Package minted Error: You must invoke LaTeX with the -shell-escape flag.
>>
>> See the minted package documentation for explanation.
>> Type H <return> for immediate help.
>> ...
>>
>> l.20 \usetheme
>> {default}
>> Pass the -shell-escape flag to LaTeX. Refer to the minted.sty documentation
>> for
>> more information.
>>
>> runsystem(which pygmentize && touch output.aex)...disabled (restricted).
>>
>>
>> ! Package minted Error: You must have `pygmentize' installed to use this
>> packag
>> e.
>>
>> See the minted package documentation for explanation.
>> Type H <return> for immediate help.
>> ...
>>
>> l.20 \usetheme
>> {default}
>> Refer to the installation instructions in the minted documentation for more
>> inf
>> ormation.
>
> [...chomp...chomp...chomp...]
>
>> runsystem(pygmentize -S default -f latex > output.pyg)...disabled
>> (restricted).
>>
>>
>>
>> ! LaTeX Error: File `output.pyg' not found.
>>
>> Type X to quit or <RETURN> to proceed,
>> or enter new name. (Default extension: pyg)
>
> Not sure why, but your -shell-escape option is being ignored. Untill
> you can solve this properly, maybe you can put the LaTeX calls in a
> shell script and set that as your org-latex-pdf-process.
>
> Hope this helps,
Hello Suvayu,
Thank you for your answer.
Following your proposal:
-------------------------------------------------------------------------------
(setq org-latex-to-pdf-process
'("/home/delexi/orgtest/pdflatex-escaped.sh %o %f"
"/home/delexi/orgtest/pdflatex-escaped.sh %o %f"
"/home/delexi/orgtest/pdflatex-escaped.sh %o %f"))
-------------------------------------------------------------------------------
Btw: Why is this a list of 3 identical tools/calls?
And pdflatex-escaped.sh:
-------------------------------------------------------------------------------
#! /bin/bash
#
pdflatex -shell-escape -interaction nonstopmode -output-directory "$1" "$2"
-------------------------------------------------------------------------------
Sadly, this leads to the same problem, complaining about -shell-escape.
When I only produce the .tex file (C-c C-e l b) and then manually
execute the before mentioned bash script on it, the PDF is generated without
any complaints.
Albeit there are not errors when creating the PDF file, the desired
syntax coloring does not take place and the source code simply appears
in black verbatim(?).
Do you have any more ideas?
Regards,
Alex
Re: [O] Source Code Syntax Highlighting in Beamer slides,
Alexander Baier <=