From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Baier Subject: Re: Source Code Syntax Highlighting in Beamer slides Date: Mon, 22 Apr 2013 01:21:47 +0200 Message-ID: <87a9orsc50.fsf@gmail.com> References: <877gjvu1mk.fsf@student.kit.edu> <20130421210800.GA12639@kuru.dyndns-at-home.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:52552) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UU3Zd-00024Z-W6 for emacs-orgmode@gnu.org; Sun, 21 Apr 2013 19:21:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UU3Zc-0001Zf-TH for emacs-orgmode@gnu.org; Sun, 21 Apr 2013 19:21:33 -0400 Received: from plane.gmane.org ([80.91.229.3]:45594) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UU3Zc-0001ZR-MC for emacs-orgmode@gnu.org; Sun, 21 Apr 2013 19:21:32 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UU3Zb-0002jU-DS for emacs-orgmode@gnu.org; Mon, 22 Apr 2013 01:21:31 +0200 Received: from nat-wh-wh36.rz.uni-karlsruhe.de ([141.70.81.154]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 22 Apr 2013 01:21:31 +0200 Received: from lexi.baier by nat-wh-wh36.rz.uni-karlsruhe.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 22 Apr 2013 01:21:31 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Suvayu Ali 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 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 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 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