Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

請教一下,我的環境是 Windows 11,我安裝了 pandoc 3.1.8,路徑如下: #2

Open
afgnsu opened this issue Nov 10, 2023 · 3 comments

Comments

@afgnsu
Copy link

afgnsu commented Nov 10, 2023

我的環境是 Windows 11 64-bit 中文版。我先下載並安裝 Pandoc 3.1.8 64位元版。

git clone https://github.com/liao961120/thesis.git
解壓縮到桌面 c:\Users\afgn\Desktop\thesis

把 win-bash.7z 解壓縮到 c:\Users\afgn\Desktop\thesis

把 c:\Program Files\Pandoc*.exe 複製到 c:\Users\afgn\Desktop\thesis\win-bash

C:\Users\afgn\Desktop\thesis\win-bash>pandoc.exe -v
pandoc.exe 3.1.8
Features: +server +lua
Scripting engine: Lua 5.4
User data directory: C:\Users\afgn\AppData\Roaming\pandoc
Copyright (C) 2006-2023 John MacFarlane. Web: https://pandoc.org
This is free software; see the source for copying conditions. There is no
warranty, not even for merchantability or fitness for a particular purpose.

C:\Users\afgn\Desktop\thesis\win-bash>pandoc-crossref.exe -v
pandoc-crossref v0.3.17.0 git commit 2e11975449fca6813fea210b0f02356d1866365f (HEAD) built with Pandoc v3.1.8, pandoc-types v1.23.1 and GHC 9.0.2

C:\Users\afgn\Desktop\thesis>.\win-bash\PortableGit\bin\bash.exe win-build-html.sh
Error running filter deps/lua/pandoc-ling.lua:
deps/lua/pandoc-ling.lua:785: attempt to index a nil value (field 'integer index')
stack traceback:
deps/lua/pandoc-ling.lua:537: in function 'pandocMakeExample'
deps/lua/pandoc-ling.lua:262: in function 'processDiv'

C:\Users\afgn\Desktop\thesis>.\win-bash\PortableGit\bin\bash.exe win-build-tex.sh
Error running filter deps/lua/pandoc-ling.lua:
Inline, list of Inlines, or string expected, got Block
cp: cannot stat 'main_pandoc.tex': No such file or directory
adding: overleaf/ (164 bytes security) (stored 0%)
adding: overleaf/deps/ (164 bytes security) (stored 0%)
adding: overleaf/deps/.gitignore (164 bytes security) (stored 0%)
adding: overleaf/deps/after-body.html (164 bytes security) (deflated 59%)
adding: overleaf/deps/chapter.html5 (164 bytes security) (deflated 66%)
adding: overleaf/deps/citation-style.csl (164 bytes security) (deflated 86%)
adding: overleaf/deps/custom.css (164 bytes security) (stored 0%)
adding: overleaf/deps/info.html5 (164 bytes security) (deflated 65%)
adding: overleaf/deps/lua/ (164 bytes security) (stored 0%)
adding: overleaf/deps/lua/appendix.lua (164 bytes security) (deflated 46%)
adding: overleaf/deps/lua/denotation-item.lua (164 bytes security) (deflated 49%)
adding: overleaf/deps/lua/denotation.lua (164 bytes security) (deflated 52%)
adding: overleaf/deps/lua/insertTables.lua (164 bytes security) (deflated 73%)
adding: overleaf/deps/lua/inspect.lua (164 bytes security) (deflated 66%)
adding: overleaf/deps/lua/pandoc-ling.lua (164 bytes security) (deflated 78%)
adding: overleaf/deps/lua/reference-title.lua (164 bytes security) (deflated 41%)
adding: overleaf/deps/lua/rmCiteSpace.lua (164 bytes security) (deflated 49%)
adding: overleaf/deps/main.html5 (164 bytes security) (deflated 67%)
adding: overleaf/deps/mainmatter.md (164 bytes security) (stored 0%)
adding: overleaf/deps/ntuthesis.cls (164 bytes security) (deflated 71%)
adding: overleaf/deps/references.md (164 bytes security) (deflated 6%)
adding: overleaf/deps/seal.pdf (164 bytes security) (deflated 0%)
adding: overleaf/deps/style.html (164 bytes security) (deflated 63%)
adding: overleaf/deps/template.tex (164 bytes security) (deflated 65%)
adding: overleaf/deps/tocChap.html (164 bytes security) (deflated 71%)
adding: overleaf/figures/ (164 bytes security) (stored 0%)
adding: overleaf/figures/GIL.png (164 bytes security) (deflated 0%)
adding: overleaf/figures/overleaf.png (164 bytes security) (deflated 3%)
adding: overleaf/figures/zotero.png (164 bytes security) (deflated 4%)
adding: overleaf/main.tex (164 bytes security) (stored 0%)
adding: overleaf/ntuthesis.cls (164 bytes security) (deflated 71%)
rm: cannot remove 'main_pandoc.tex': No such file or directory

請教為何會跳出這個錯誤訊息? 我找遍了也找不到 main_pandoc.tex :(

@liao961120
Copy link
Owner

liao961120 commented Nov 10, 2023

把 c:\Program Files\Pandoc*.exe 複製到 c:\Users\afgn\Desktop\thesis\win-bash

不要win-bash/ 裡的 pandoc.exe / pandoc-crossref.exe 覆寫掉
下載下來的 win-bash/ 內含所有所需的執行檔


解壓之後,cd 到 c:\Users\afgn\Desktop\thesis\,直接執行

.\win-bash\PortableGit\bin\bash.exe win-build-html.sh

@afgnsu
Copy link
Author

afgnsu commented Nov 10, 2023

廖先生,請教一下,因為原本的 win-bash.7z 解壓縮後,pandoc.exe 和 pandoc-crossref.exe 的版本不一致,所以我去網路上下載了 pandoc 2.14.0.1,然後覆蓋掉原本的 pandoc.exe 即可順利執行,結果如下:

C:\Users\afgn\Desktop\thesis>.\win-bash\pandoc.exe -v
pandoc.exe 2.14.0.1
Compiled with pandoc-types 1.22, texmath 0.12.3, skylighting 0.10.5.1,
citeproc 0.4, ipynb 0.1.0.1
User data directory: C:\Users\afgn\AppData\Roaming\pandoc
Copyright (C) 2006-2021 John MacFarlane. Web: https://pandoc.org
This is free software; see the source for copying conditions. There is no
warranty, not even for merchantability or fitness for a particular purpose.

C:\Users\afgn\Desktop\thesis>.\win-bash\pandoc-crossref.exe -v
pandoc-crossref v0.3.11.0 git commit 7fa21d87c874eeb787e808a7506ef4c784b5812b (HEAD) built with Pandoc v2.14.0.1, pandoc-types v1.22 and GHC 8.10.4

C:\Users\afgn\Desktop\thesis>.\win-bash\PortableGit\bin\bash.exe win-build-html.sh

C:\Users\afgn\Desktop\thesis>.\win-bash\PortableGit\bin\bash.exe win-build-tex.sh
adding: overleaf/ (164 bytes security) (stored 0%)
adding: overleaf/deps/ (164 bytes security) (stored 0%)
adding: overleaf/deps/.gitignore (164 bytes security) (stored 0%)
adding: overleaf/deps/after-body.html (164 bytes security) (deflated 59%)
adding: overleaf/deps/chapter.html5 (164 bytes security) (deflated 66%)
adding: overleaf/deps/citation-style.csl (164 bytes security) (deflated 86%)
adding: overleaf/deps/custom.css (164 bytes security) (stored 0%)
adding: overleaf/deps/info.html5 (164 bytes security) (deflated 65%)
adding: overleaf/deps/lua/ (164 bytes security) (stored 0%)
adding: overleaf/deps/lua/appendix.lua (164 bytes security) (deflated 46%)
adding: overleaf/deps/lua/denotation-item.lua (164 bytes security) (deflated 49%)
adding: overleaf/deps/lua/denotation.lua (164 bytes security) (deflated 52%)
adding: overleaf/deps/lua/insertTables.lua (164 bytes security) (deflated 73%)
adding: overleaf/deps/lua/inspect.lua (164 bytes security) (deflated 66%)
adding: overleaf/deps/lua/pandoc-ling.lua (164 bytes security) (deflated 78%)
adding: overleaf/deps/lua/reference-title.lua (164 bytes security) (deflated 41%)
adding: overleaf/deps/lua/rmCiteSpace.lua (164 bytes security) (deflated 49%)
adding: overleaf/deps/main.html5 (164 bytes security) (deflated 67%)
adding: overleaf/deps/mainmatter.md (164 bytes security) (stored 0%)
adding: overleaf/deps/ntuthesis.cls (164 bytes security) (deflated 71%)
adding: overleaf/deps/references.md (164 bytes security) (deflated 6%)
adding: overleaf/deps/seal.pdf (164 bytes security) (deflated 0%)
adding: overleaf/deps/style.html (164 bytes security) (deflated 63%)
adding: overleaf/deps/template.tex (164 bytes security) (deflated 65%)
adding: overleaf/deps/tocChap.html (164 bytes security) (deflated 71%)
adding: overleaf/figures/ (164 bytes security) (stored 0%)
adding: overleaf/figures/GIL.png (164 bytes security) (deflated 0%)
adding: overleaf/figures/overleaf.png (164 bytes security) (deflated 3%)
adding: overleaf/figures/zotero.png (164 bytes security) (deflated 4%)
adding: overleaf/main.tex (164 bytes security) (stored 0%)
adding: overleaf/main_pandoc.tex (164 bytes security) (deflated 63%)
adding: overleaf/ntuthesis.cls (164 bytes security) (deflated 71%)

C:\Users\afgn\Desktop\thesis>

我去檢查 docs\thesis.pdf 確實有產生新檔案,但是內容都是原來的,就算我有修改 chatpers\01-intro.md 也沒用,這是不是表示我該把論文內容修改到我自己的 github 路徑下? 然後再修改某個設定檔,才會輸出成我的論文? 不好意思,麻煩您了。

再請教一下,如果我要修改論文的浮水印,是否只要修改 /deps/ntuthesis.cls 即可? 把 seal.pdf 改成我學校的浮水印就可以? 只是放置位置和大小的部分我要再測試一下。

@afgnsu
Copy link
Author

afgnsu commented Nov 10, 2023

2023-11-10_120306

這個是原來 win-bash.7z 解壓縮後跳出的錯誤,我上次就是卡在這裡就停住了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants