/usr/bin/bash:行1: panbook:未找到命令
The terminal process "D:\msys64\usr\bin\bash.exe '-l', '-c', 'panbook book --part=100-introduction.md && start build/part.pdf'" terminated with exit code: 127.
加上“-i”可以正常执行。
2、但此时执行,会提示:
Executing task: panbook book --part=100-introduction.md && start build/part.pdf <
[NOTE] Welcome to PanBook!
[NOTE] use -V device:(pc|mobile|kindle) to produce different size of pdf
[NOTE] use -V cover:(1-60|R|N|filepath) select cover background.R=random,N=no cover,filepath=custom cover file
[NOTE] use -V pagestyle:style to set pagestyle
pandoc.exe: 100-introduction.md: openBinaryFile: does not exist (No such file or directory)
Rc files read:
NONE
Latexmk: This is Latexmk, John Collins, 29 September 2020, version: 4.70b.
Set environment variable BIBINPUTS='D:/workspaces/PanBook/build;'
Set environment variable TEXINPUTS='D:/workspaces/PanBook/build;'
Latexmk: All targets (D:/workspaces/PanBook/build/part.xdv D:/workspaces/PanBook/build/part.pdf) are up-to-date
[NOTE] book Compile SUCCESSFUL
Executing task: panbook book --part=src\chapter-01\100-introduction.md && start build/part.pdf <
[NOTE] Welcome to PanBook!
[NOTE] use -V device:(pc|mobile|kindle) to produce different size of pdf
[NOTE] use -V cover:(1-60|R|N|filepath) select cover background.R=random,N=no cover,filepath=custom cover file
[NOTE] use -V pagestyle:style to set pagestyle
pandoc.exe: srcchapter-01100-introduction.md: openBinaryFile: does not exist (No such file or directory)
Rc files read:
NONE
Latexmk: This is Latexmk, John Collins, 29 September 2020, version: 4.70b.
Set environment variable BIBINPUTS='D:/workspaces/PanBook/build;'
Set environment variable TEXINPUTS='D:/workspaces/PanBook/build;'
Latexmk: All targets (D:/workspaces/PanBook/build/part.xdv D:/workspaces/PanBook/build/part.pdf) are up-to-date
[NOTE] book Compile SUCCESSFUL
3、不使用task,直接在集成到vscode的msys2中执行“panbook book --part=chapter-01/100-introduction.md”是可以的(但奇怪为何不是“panbook book --part=src/chapter-01/100-introduction.md“?)
环境:pandoc版本为2.18(忘记碰到什么问题了,换到2.18才解决,crossref也是对应的版本),windows10,工作目录”D:\workspaces\PanBook“。
问题如下:
编译src/chapter-01/100-introduction.md时,
1、settings.json中,"terminal.integrated.shellArgs.windows": ["-i", "-l"],如果不加“-i”命令,执行part task,会提示:
加上“-i”可以正常执行。
2、但此时执行,会提示:
因为task中是“fileBasename”,命令执行时找不到文件,换成{file}或{relativeFile}也不行,因为路径分隔符为“/”不识别,仍然提示找不到文件,以{relativeFile}为例:
3、不使用task,直接在集成到vscode的msys2中执行“panbook book --part=chapter-01/100-introduction.md”是可以的(但奇怪为何不是“panbook book --part=src/chapter-01/100-introduction.md“?)