如何从 MacOS 的终端在 Texmaker 中打开一个 tex 文件?

How to open a tex file in Texmaker from terminal in MacOS?

在 Ubuntu 中,我可以简单地从终端 运行:

texmaker file.tex

在 Texmaker 中打开了我的 tex 文件。在 MacOS 中,找不到 texmaker 命令,即使我安装了 Texmaker

如何在 MacOS 中实现这一点?是否有等效的命令?

如果你的意思是 this 那么你可以用 homebrew 安装它,使用这个命令:

brew cask install texmaker

安装 Texmaker 后,您可以添加:

alias texmaker="open -a texmaker"

给你的.profile。从现在开始,应该可以从命令行简单地 运行:

texmaker file.tex

file.tex 所在的位置。