NWPUMetaphysicsOffice / Yet-Another-LaTeX-Template-for-NPU-Thesis

西北工业大学硕博学位论文模版 | Yet Another Thesis Template for Northwestern Polytechnical University
https://nwpumetaphysicsoffice.github.io/Yet-Another-LaTeX-Template-for-NPU-Thesis/
GNU General Public License v3.0
369 stars 96 forks source link

[BUG]ubuntu+gnome下无open命令导致make最后一步错误 #109

Closed Alex-Beng closed 11 months ago

Alex-Beng commented 11 months ago

描述您的问题 (Describe the bug)

在ubuntu + gnome桌面下,运行make samplebib, 在make最后一步提示未找到open命令。pdf正常生成。

环境与版本信息

  1. 代码版本(Code version)(留空则默认最新):
  2. 操作系统 (OS):Ubuntu 20:04
  3. Tex Live版本,其他Tex版本也请注明 (Version of Tex Live or other Tex distribution):
  4. Tex 编译器 (Tex compiler, eg. XeTeX):

错误内容 (Error contents)

pdf正常生成且内容格式正确,但是在ubuntu+gnome中没有open命令,只有xdg-open,见ask ubuntu

导致后面使用$(OPEN) xxx.pdf时找不到open命令。

ifeq ($(PLATFORM), Windows)
    RM = del /s /f
    OPEN = cmd /c start
    CLOSE = cmd /c taskkill /im Acrobat.exe /t /f
else
    RM = rm -rf
    OPEN = open
    PID = $$(ps -ef | grep AdobeAcrobat | grep -v grep | awk '{print $$2}')
    CLOSE = kill -9 $(PID)
endif

不怎么影响正常使用,希望支持linux,或者干脆去掉打开(因为我是这样改的)。

open yanputhesis-sample.pdf
make:open:命令未找到
make: *** [makefile:57:opensample] 错误 127
polossk commented 11 months ago

我手边没有ubuntu,对应的命令应该是xdg-open? 您可以测试下,后续应该会把makefile修复下

---- 回复的原邮件 ---- | 发件人 | Alex @.> | | 发送日期 | 2023年11月16日 02:06 | | 收件人 | NWPUMetaphysicsOffice/Yet-Another-LaTeX-Template-for-NPU-Thesis @.> | | 抄送人 | Subscribed @.***> | | 主题 | [NWPUMetaphysicsOffice/Yet-Another-LaTeX-Template-for-NPU-Thesis] [BUG]ubuntu+gnome下无open命令导致make最后一步错误 (Issue #109) |

描述您的问题 (Describe the bug)

在ubuntu + gnome桌面下,运行make samplebib, 在make最后一步提示未找到open命令。pdf正常生成。

环境与版本信息

代码版本(Code version)(留空则默认最新): 操作系统 (OS):Ubuntu 20:04 Tex Live版本,其他Tex版本也请注明 (Version of Tex Live or other Tex distribution): Tex 编译器 (Tex compiler, eg. XeTeX):

错误内容 (Error contents)

pdf正常生成且内容格式正确,但是在ubuntu+gnome中没有open命令,只有xdg-open,见ask ubuntu。

导致后面使用$(OPEN) xxx.pdf时找不到open命令。

ifeq ($(PLATFORM), Windows) RM = del /s /f OPEN = cmd /c start CLOSE = cmd /c taskkill /im Acrobat.exe /t /f elseRM = rm -rf OPEN = open PID = $$(ps -ef | grep AdobeAcrobat | grep -v grep | awk '{print $$2}')CLOSE = kill -9 $(PID)endif

不怎么影响正常使用,希望支持ubuntu,或者干脆去掉打开(因为我是这样改的)。

open yanputhesis-sample.pdf make:open:命令未找到 make: *** [makefile:57:opensample] 错误 127

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

Alex-Beng commented 11 months ago

Gnome桌面下是可以使用xdg-open的,我直接提个pr吧

polossk commented 11 months ago

OK 感谢帮助

---- 回复的原邮件 ---- | 发件人 | Alex @.> | | 发送日期 | 2023年11月16日 11:51 | | 收件人 | NWPUMetaphysicsOffice/Yet-Another-LaTeX-Template-for-NPU-Thesis @.> | | 抄送人 | Shangkun @.>, Comment @.> | | 主题 | Re: [NWPUMetaphysicsOffice/Yet-Another-LaTeX-Template-for-NPU-Thesis] [BUG]ubuntu+gnome下无open命令导致make最后一步错误 (Issue #109) |

Gnome桌面下是可以使用xdg-open的,我直接提个pr吧

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

polossk commented 11 months ago

fixed in #110