adereume / minted

Automatically exported from code.google.com/p/minted
0 stars 0 forks source link

Can't use minted because it uses "which -s" but which doesn't have that option #49

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
muelli@bigbox /tmp $ cat mint.tex 
\documentclass{scrartcl}
\usepackage{xcolor}
\usepackage{minted}

\usemintedstyle{default} % Get a list of styles using ``pygmentize -L styles''
\newminted{python}{% Defines new environments: pythoncode and pythoncode* to 
create listing enviroments with these options.
stepnumber=5,                   % the step between two line-numbers. If it's 1 
each line will be numbered
numbersep=5pt,                  % how far the line-numbers are from the code
bgcolor=lightgray,  % choose the background color. You must add 
\usepackage{xcolor}
showspaces=false,               % show spaces adding particular underscores
showtabs=false,                 % show tabs within strings adding particular 
underscores
% frame=single,                   % adds a frame around the code
tabsize=4,                  % sets default tabsize to 2 spaces
% firstnumber=15,
numberblanklines=false,
frame=lines,            %(none|leftline|topline|bottomline|lines|single): The type of 
frame to put around the source code listing (default: none).
}

\begin{document}
\begin{minted}[linenos=true,bgcolor=lightgray]{python}
def foo(bar):
    '''Foo's a bar
    returns a baz
    '''
    baz = bar*2 + 'bar'
    return baz # return baz
\end{minted}
\end{document}
muelli@bigbox /tmp $ pdflatex -shell-escape mint 2> mint.stderr
This is pdfTeX, Version 3.1415926-1.40.11 (TeX Live 2011)
 \write18 enabled.
entering extended mode
(./mint.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, dumylang, nohyphenation, lo
aded.
(/usr/share/texlive/texmf-dist/tex/latex/koma-script/scrartcl.cls
Document Class: scrartcl 2011/02/19 v3.08a KOMA-Script document class (article)

(/usr/share/texlive/texmf-dist/tex/latex/koma-script/scrkbase.sty
(/usr/share/texlive/texmf-dist/tex/latex/koma-script/scrbase.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/share/texlive/texmf-dist/tex/latex/koma-script/scrlfile.sty
Package scrlfile, 2011/02/11 v3.08a KOMA-Script package (loading files)
                  Copyright (C) Markus Kohm

))) (/usr/share/texlive/texmf-dist/tex/latex/koma-script/tocbasic.sty)
(/usr/share/texlive/texmf-dist/tex/latex/koma-script/scrsize11pt.clo)
(/usr/share/texlive/texmf-dist/tex/latex/koma-script/typearea.sty
Package typearea, 2011/02/19 v3.08a KOMA-Script package (type area)
                  Copyright (C) Frank Neukam, 1992-1994
                  Copyright (C) Markus Kohm, 1994-

)) (/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/color.cfg)
(/usr/share/texlive/texmf-dist/tex/latex/pdftex-def/pdftex.def))
(/usr/share/texlive/texmf-dist/tex/latex/minted/minted.sty
(/usr/share/texlive/texmf-dist/tex/latex/fancyvrb/fancyvrb.sty
Style option: `fancyvrb' v2.7a, with DG/SPQR fixes, and firstline=lastline fix 
<2008/02/07> (tvz)) (/usr/share/texlive/texmf-dist/tex/latex/float/float.sty)
(/usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty)
(/usr/share/texlive/texmf-dist/tex/latex/tools/calc.sty)
(/usr/share/texlive/texmf-dist/tex/latex/ifplatform/ifplatform.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifluatex.sty)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty))
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/catchfile.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/etexcmds.sty)) (./mint.w18)
)/usr/bin/pygmentize
) (./mint.pyg) (./mint.aux)
(/usr/share/texlive/texmf-dist/tex/context/base/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
) (./mint.out.pyg)
Underfull \hbox (badness 10000) in paragraph at lines 27--28

[1{/usr/share/texlive/texmf/fonts/map/pdftex/updmap/pdftex.map}] (./mint.aux) )
(see the transcript file for additional information)</usr/share/texlive/texmf-d
ist/fonts/type1/public/amsfonts/cm/cmitt10.pfb></usr/share/texlive/texmf-dist/f
onts/type1/public/amsfonts/cm/cmr10.pfb></usr/share/texlive/texmf-dist/fonts/ty
pe1/public/amsfonts/cm/cmr6.pfb></usr/share/texlive/texmf-dist/fonts/type1/publ
ic/amsfonts/cm/cmtt10.pfb>
Output written on mint.pdf (1 page, 32549 bytes).
Transcript written on mint.log.
muelli@bigbox /tmp $ cat mint.stderr 
which: invalid option -- 's'
muelli@bigbox /tmp $ grep which 
/usr/share/texlive/texmf-dist/tex/latex/minted/minted.sty
    \immediate\write18{which -s #1 && touch \jobname.aex}
muelli@bigbox /tmp $ which --help
Usage: /usr/bin/which [options] [--] COMMAND [...]
Write the full path of COMMAND(s) to standard output.

  --version, -[vV] Print version and exit successfully.
  --help,          Print this help and exit successfully.
  --skip-dot       Skip directories in PATH that start with a dot.
  --skip-tilde     Skip directories in PATH that start with a tilde.
  --show-dot       Don't expand a dot to current directory in output.
  --show-tilde     Output a tilde for HOME directory for non-root.
  --tty-only       Stop processing options on the right if not on tty.
  --all, -a        Print all matches in PATH, not just the first
  --read-alias, -i Read list of aliases from stdin.
  --skip-alias     Ignore option --read-alias; don't read stdin.
  --read-functions Read shell functions from stdin.
  --skip-functions Ignore option --read-functions; don't read stdin.

Recommended use is to write the output of (alias; declare -f) to standard
input, so that which can show aliases and shell functions. See which(1) for
examples.

If the options --read-alias and/or --read-functions are specified then the
output can be a full alias or function definition, optionally followed by
the full path of each command used inside of those.

Report bugs to <which-bugs@gnu.org>.
muelli@bigbox /tmp $ 

Which doesn't have a "-s" option.

Original issue reported on code.google.com by 4tmue...@gmail.com on 1 May 2011 at 3:41

GoogleCodeExporter commented 8 years ago

Original comment by konrad.r...@gmail.com on 2 May 2011 at 8:33

GoogleCodeExporter commented 8 years ago
Hi, i have remove -s option from minted.sty and work!

before
 \immediate\write18{which -s #1 && touch \jobname.aex}

after
 \immediate\write18{which #1 && touch \jobname.aex}

(line 60 aprox)

Original comment by arielsan...@gmail.com on 25 Aug 2011 at 3:56