Pregunta

Estoy trabajando con látex en Vista utilizando TeXnicCenter 2.0 Alpha 3 (build 1118) después de haber instalado MiKTeX 2.8 . Quiero utilice código que destaca para Objective-C y leer aquí que el paquete acuñada es grande. He instalado Python 2.7 y pygmentize según lo dicho en el acuñada documentación . Asimismo, establecer la opción de compilador -shell-de escape en TeXnicCenter. El compilador encuentra la secuencia de comandos pygmentize pero se produce el siguiente error.

  

archivo "C: \ python27 \ Scripts \ pygmentize.exe", línea 1 SyntaxError: Non-ASCII carácter '\ x90' en el archivo C: \ python27 \ Scripts \ pygmentize.exe en la línea 1, pero sin codificación declarada; ver http://www.python.org/peps/pep-0263.html para más detalles! LaTeX Error: El archivo `Test.out.pyg' not found. Tipo X para dejar de fumar o si proceder o introduzca el nuevo nombre. (Extensión por defecto: out.pyg) Introducir nombre del archivo: Parada de emergencia.

No se puede encontrar la manera de solucionar el problema. Traté de guardar el archivo como ANSI tex o UTF-8. Las únicas adiciones que he realizado en el archivo tex son el paquete incluya

  

\ usepackage {acuñada}

y este sencillo ejemplo de la documentación acuñada.

  

\ {menta pitón} | importar este |

¿Fue útil?

Solución

The minted documentation is outdated: newer versions of Pygments apparently include a Windows executable pygmentize.exe (unfortunately, their Trac is currently offline so I can’t look up the relevant revision which changed that).

This means that the fix mentioned in the documentation should be redundant. Therefore, try the following steps:

  1. Remove the pygmentize.cmd script entirely (best not delete it yet – just rename it). Try if minted now works.
  2. If that doesn’s work, put the following into the pygmentize.cmd:

    @echo off
    set PYTHONPATH=C:\Python27
    %PYTHONPATH%\Scripts\pygmentize.exe %*
    

    i.e. don’t invoke the *.exe file via the Python interpreter.

Unfortunately, I can’t test this now since I don’t have Windows here. But one of the options should work.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top