如何编译 gedit LaTeX 插件?

Ing*_*ngo 11 gedit latex compiling

因为我想使用存储库中的 Gedit 3.2 不幸不可用的 Gedit LaTeX 插件,所以我想自己编译它。您可以在http://git.gnome.org/browse/gedit-latex上获得的最新版本确实支持 GNOME 3 的 Gedit。

在文档中它说:

由于读取设置的限制,插件当前必须安装在与 gedit 相同的前缀中。例如,如果您使用发行版中的 gedit 3,则需要执行

./configure --prefix=/usr make sudo make install

如果您使用的是 64 位发行版,则还需要传递 --libdir=/usr/lib64./configure脚本。

这就是为什么我cd进入包含代码的目录,并尝试运行./configure --prefix=/usr --libdir=/usr/lib64. 不幸的是,这不起作用,并给出错误消息:

bash: ./configure: No such file or directory
Run Code Online (Sandbox Code Playgroud)

检查文件夹后,确实没有文件configure,而只有configure.ac. 我可以做什么来编译这个插件?

hhl*_*hlp 9

  1. 构建配置文件所需的库

    sudo apt-get install intltool libtool
    
    Run Code Online (Sandbox Code Playgroud)
  2. 编译这个插件所必需的依赖

    sudo apt-get install gedit-dev
    
    Run Code Online (Sandbox Code Playgroud)
  3. 构建配置文件

    touch config.rpath
    ./autogen.sh
    
    Run Code Online (Sandbox Code Playgroud)
  4. 配置和编译

    ./configure --prefix=/usr
    make
    sudo make install
    
    Run Code Online (Sandbox Code Playgroud)

如果您使用的是64位的分布,还需要通过--libdir=/usr/lib64./configure script

    ./configure --prefix=/usr --libdir=/usr/lib64
Run Code Online (Sandbox Code Playgroud)

对于 64 位发行版,我还必须创建两个符号链接,否则插件不会显示:

sudo ln -s /usr/lib64/gedit/plugins/latex.plugin /usr/lib/gedit/plugins/
sudo ln -s /usr/lib64/gedit/plugins/latex /usr/lib/gedit/plugins/
Run Code Online (Sandbox Code Playgroud)