2012-11-15 2 views
1
내가 이렇게 PowerShell 스크립트에서 파일에 pdflatex.exe 전화를 시도하고

:PowerShell 스크립트에서 latex.exe pdflatex.exe 전화를 걸거나 할 수 없습니다

Out-File -FilePath C:\path\to\file\foo.txt -InputObject $bar -Encoding 'ASCII' 
    texdoc.exe letter 
    pdflatex.exe C:\path\to\file\example.tex 
    latex.exe C:\path\to\file\example.tex 
    pdflatex.exe 'C:\path\to\file\example.tex' 
    latex.exe 'C:\path\to\file\example.tex' 
    pdflatex.exe C:/path/to/file/example.tex 
    latex.exe C:/path/to/file/example.tex 
    pdflatex.exe 'C:/path/to/file/example.tex' 
    latex.exe 'C:/path/to/file/example.tex' 

첫 번째 줄은 작동하므로 사용 권한 문제가 없다 . 두 번째 호출이 작동하므로 바이너리에 액세스하는 데 문제가 없습니다. 후속 호출은 작동하지 않습니다. 디렉토리에 기존 .ps, .dvi 또는 .pdf 파일이 없습니다.

같은 파일 (example.tex)에서는 powershell 명령 줄에서 호출하는 것이 좋지만 스크립트에서는 호출하지 않는 것이 좋습니다. 왜? pdflatex 또는 latex가 던진 오류 메시지를 보려면 어떻게해야합니까? MikTex 2.9, Windows 7, Powershell 2.0.

답변

1
아마

하지 최적의 대답은,하지만 난 "CD-보내고"는 relavant 디렉토리에

Set-Location -Path C:\path\to\file\ 
    pdflatex example.tex 
를 사용하여이 문제를 가지고
관련 문제