MiKTeX / miktex

the MiKTeX source code

Home Page:https://miktex.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature: texify needs parameter to set output directory

xiaoxstz opened this issue · comments

Environment:

  • MikTeX: 24.1
  • OS: Windows10

Description

According to the help information: texify.exe --help, there is no parameter for output directory.

Thank you, as a workaround you could pass --output-directory via the --tex-options option.

The option is --tex-option not --tex-options

But, there still is some issue.

Test1

Test command : texify --synctex --pdf --tex-option="-output-directory=./output/" WeeklyReport.tex

The command's output:

TeX option "--output-directory" is not supported.

Sorry, but texify did not succeed.

Test2

Test command : texify --synctex --pdf --tex-option="--output-directory=./output/" WeeklyReport.tex

The command's output:

TeX option "--output-directory" is not supported.

Sorry, but texify did not succeed.

Test3

Test command : `texify --synctex --pdf --tex-option="-out-directory=./output/" WeeklyReport.tex

The command's output:

Sorry, but pdflatex did not succeed.

The log file hopefully contains the information to get MiKTeX going again:

  C:\Users\Tanzi\scoop\apps\latex\current\texmfs\data\miktex\log\pdflatex.log

Sorry, but "MiKTeX Compiler Driver" did not succeed.

The log file hopefully contains the information to get MiKTeX going again:

  C:\Users\Tanzi\scoop\apps\latex\current\texmfs\data\miktex\log\texify.log

texify.log:

2024-02-21 17:55:11,970+0800 INFO  texify - this process (16316) started by cmd in directory D:\Desktop\Research\Latex.WeeklyReport\2022.11.20 with command line: texify --synctex --pdf --tex-option=-out-directory=./output/ WeeklyReport.tex
2024-02-21 17:55:11,971+0800 INFO  texify - running on Windows 10.0.19045
2024-02-21 17:55:11,983+0800 INFO  texify.core - start process: pdflatex --synctex=1 -out-directory=./output/ D:/Desktop/Research/Latex.WeeklyReport/2022.11.20\WeeklyReport.tex
2024-02-21 17:55:12,358+0800 FATAL texify.core - TeX engine failed for some reason (see log file).
2024-02-21 17:55:12,358+0800 FATAL texify.core - Data: 
2024-02-21 17:55:12,358+0800 FATAL texify.core - Source: Programs\MiKTeX\texify\mcd.cpp:1564
2024-02-21 17:55:12,360+0800 FATAL texify - TeX engine failed for some reason (see log file).
2024-02-21 17:55:12,360+0800 FATAL texify - Info: 
2024-02-21 17:55:12,360+0800 FATAL texify - Source: Programs\MiKTeX\texify\mcd.cpp
2024-02-21 17:55:12,360+0800 FATAL texify - Line: 1564

pdflatex.log:

2024-02-21 17:55:12,282+0800 INFO  pdflatex - this process (16504) started by texify in directory D:\Desktop\Research\Latex.WeeklyReport\2022.11.20 with command line: pdflatex --synctex=1 -out-directory=./output/ D:/Desktop/Research/Latex.WeeklyReport/2022.11.20\WeeklyReport.tex
2024-02-21 17:55:12,282+0800 INFO  pdflatex - running on Windows 10.0.19045
2024-02-21 17:55:12,284+0800 INFO  pdflatex - this is MiKTeX-PDFTEX 4.18.0 (1.40.25) (MiKTeX 24.1 Portable)
2024-02-21 17:55:12,286+0800 INFO  pdflatex - allowing known shell commands
2024-02-21 17:55:12,293+0800 FATAL pdflatex.core - The command line options could not be processed.
2024-02-21 17:55:12,293+0800 FATAL pdflatex.core - Data: optionError="unknown option"
2024-02-21 17:55:12,293+0800 FATAL pdflatex.core - Source: Libraries\MiKTeX\TeXAndFriends\webapp.cpp:356
2024-02-21 17:55:12,293+0800 FATAL pdflatex - The command line options could not be processed.
2024-02-21 17:55:12,293+0800 FATAL pdflatex - Info: optionError="unknown option"
2024-02-21 17:55:12,293+0800 FATAL pdflatex - Source: Libraries\MiKTeX\TeXAndFriends\webapp.cpp
2024-02-21 17:55:12,293+0800 FATAL pdflatex - Line: 356
2024-02-21 17:55:12,297+0800 INFO  pdflatex - this process (16504) finishes with exit code 1

Test4

Command pdflatex --synctex=1 -interaction=nonstopmode -file-line-error -output-directory=./output/ WeeklyReport.tex works

Conclusion

pdflatex needs option -output-directory, but it cannot be passed to texify

texify accepts option -out-directory, but pdflatex does not.

So, I think it's a bug

You are right, -output-directory is a forbidden option because it would interfere with the -clean option. I think, -output-directory should be allowed when -clean is not specified.

I think it is possible to work around the missing --output-directory option:

  1. change into the output directory
  2. invoke texify with a fully-qualified input file name

I found that replacing texify with latexmk is great