emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Alexander Baier <lexi.baier@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Source Code Syntax Highlighting in Beamer slides
Date: Mon, 22 Apr 2013 01:21:47 +0200	[thread overview]
Message-ID: <87a9orsc50.fsf@gmail.com> (raw)
In-Reply-To: 20130421210800.GA12639@kuru.dyndns-at-home.com

Suvayu Ali <fatkasuvayu+linux@gmail.com> 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.
>> 
>> )
>> \minted@bgbox=\box61
>> \minted@code=\write6
>> \@float@every@listing=\toks51
>> \c@listing=\count166
>> )
>> 
>> ! 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

      parent reply	other threads:[~2013-04-21 23:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-21 19:25 Source Code Syntax Highlighting in Beamer slides Alexander Baier
2013-04-21 21:08 ` Suvayu Ali
2013-04-21 22:13   ` Nicolas Goaziou
2013-04-21 23:03     ` Alexander Baier
2013-04-22  6:22       ` Suvayu Ali
2013-04-22  6:29         ` Bastien
2013-04-22  7:15           ` Suvayu Ali
2013-04-21 23:21   ` Alexander Baier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a9orsc50.fsf@gmail.com \
    --to=lexi.baier@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).