vim和latex环境搭建

2024-09-04 22:18
文章标签 vim 搭建 环境 latex

本文主要是介绍vim和latex环境搭建,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

安装软件

下载软件

  • 下载gvim:http://www.vim.org/download.php,安装的是 gvim74.exe
  • 下载latex:http://vim-latex.sourceforge.net/,下载的是vim-latex-1.8.23-20141116.812-gitd0f31c9.tar.gz

安装

gvim安装自不必说。

在http://vim-latex.sourceforge.net/index.php?subject=download&title=Download讲了安装步骤,拷贝如下:

Installation Instructions

Step 1 of 4: Download and extract the archives

Extract one of the archives above into your ~/vimfiles directory (if you are using windows) or ~/.vim directory (if you are using *nix).
If you are updating after a long time, it might be a good idea to remove the ~/vimfiles/ftplugin/latex-suite directory from previous installations before reinstalling.

NOTE: If you already have some latex ftplugin files, read the Advanced Installation Instructions to make sure you do not over-write any of your files.

Step 2 of 4: Set a few things in .vimrc

The recommended settings for vim-latex in your .vimrc file are now only described in the vim-latex manual.

Step 3 of 4: Install the help files

To install the included latex-suite.txt and latexhelp.txt files as vim help files, start vim and do the following:

helptags ~/.vim/doc     (for *nix users) 
helptags ~/vimfiles/doc     (for windows users) 

Step 4 of 4: Done!

Thats it! You are done! Now start editing a latex file in vim. Latex-Suite should start up automatically. You can do

:help latex-suite.txt

from within vim to get the online Latex-Suite reference.

注:1. win下面,.vimrc对应的就是_vimrc;2. 上述helptags命令后面可以用相对路径或全路径文件名,如:

:helptags d:/Vim/vimfiles/doc

上面第二步的网页内容拷贝在这里,方便取用:

Installation and recommended Settings

If you are reading this, it most probably means that you have already installed Latex-Suite and the help files. If this is not the case, follow the detailed instructions on Latex-Suite’s download page.

Make sure that you create a few necessary settings in your ~/.vimrc.

" REQUIRED. This makes vim invoke Latex-Suite when you open a tex file.
filetype plugin on" IMPORTANT: win32 users will need to have 'shellslash' set so that latex
" can be called correctly.
set shellslash" IMPORTANT: grep will sometimes skip displaying the file name if you
" search in a singe file. This will confuse Latex-Suite. Set your grep
" program to always generate a file-name.
set grepprg=grep\ -nH\ $*" OPTIONAL: This enables automatic indentation as you type.
filetype indent on" OPTIONAL: Starting with Vim 7, the filetype of empty .tex files defaults to
" 'plaintex' instead of 'tex', which results in vim-latex not being loaded.
" The following changes the default filetype back to 'tex':
let g:tex_flavor='latex'

In addition, the following settings could go in your ~/.vim/ftplugin/tex.vim file:

" this is mostly a matter of taste. but LaTeX looks good with just a bit
" of indentation.
set sw=2
" TIP: if you write your \label's as \label{fig:something}, then if you
" type in \ref{fig: and press <C-n> you will automatically cycle through
" all the figure labels. Very useful!
set iskeyword+=:

顺便可以看到,http://vim-latex.sourceforge.net/documentation/latex-suite/index.html是详细的vim-latex在线帮助。

vim文档

http://www.vim.org/docs.php提供了一些vim的文档。

latex的用上面helptags的方法来即可。

练习

按照latex-suite的Tutorial,gvim打开tex文件都闪退;只能用vim。还不清楚具体原因。另外,也没有看到latex-suite的菜单。

其他

vi常用命令

这篇关于vim和latex环境搭建的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1137186

相关文章

本地搭建DeepSeek-R1、WebUI的完整过程及访问

《本地搭建DeepSeek-R1、WebUI的完整过程及访问》:本文主要介绍本地搭建DeepSeek-R1、WebUI的完整过程及访问的相关资料,DeepSeek-R1是一个开源的人工智能平台,主... 目录背景       搭建准备基础概念搭建过程访问对话测试总结背景       最近几年,人工智能技术

在Mysql环境下对数据进行增删改查的操作方法

《在Mysql环境下对数据进行增删改查的操作方法》本文介绍了在MySQL环境下对数据进行增删改查的基本操作,包括插入数据、修改数据、删除数据、数据查询(基本查询、连接查询、聚合函数查询、子查询)等,并... 目录一、插入数据:二、修改数据:三、删除数据:1、delete from 表名;2、truncate

5分钟获取deepseek api并搭建简易问答应用

《5分钟获取deepseekapi并搭建简易问答应用》本文主要介绍了5分钟获取deepseekapi并搭建简易问答应用,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需... 目录1、获取api2、获取base_url和chat_model3、配置模型参数方法一:终端中临时将加

VScode连接远程Linux服务器环境配置图文教程

《VScode连接远程Linux服务器环境配置图文教程》:本文主要介绍如何安装和配置VSCode,包括安装步骤、环境配置(如汉化包、远程SSH连接)、语言包安装(如C/C++插件)等,文中给出了详... 目录一、安装vscode二、环境配置1.中文汉化包2.安装remote-ssh,用于远程连接2.1安装2

如何设置vim永久显示行号

《如何设置vim永久显示行号》在Linux环境下,vim默认不显示行号,这在程序编译出错时定位错误语句非常不便,通过修改vim配置文件vimrc,可以在每次打开vim时永久显示行号... 目录设置vim永久显示行号1.临时显示行号2.永www.chinasem.cn久显示行号总结设置vim永久显示行号在li

Java中的Opencv简介与开发环境部署方法

《Java中的Opencv简介与开发环境部署方法》OpenCV是一个开源的计算机视觉和图像处理库,提供了丰富的图像处理算法和工具,它支持多种图像处理和计算机视觉算法,可以用于物体识别与跟踪、图像分割与... 目录1.Opencv简介Opencv的应用2.Java使用OpenCV进行图像操作opencv安装j

mysql-8.0.30压缩包版安装和配置MySQL环境过程

《mysql-8.0.30压缩包版安装和配置MySQL环境过程》该文章介绍了如何在Windows系统中下载、安装和配置MySQL数据库,包括下载地址、解压文件、创建和配置my.ini文件、设置环境变量... 目录压缩包安装配置下载配置环境变量下载和初始化总结压缩包安装配置下载下载地址:https://d

将Python应用部署到生产环境的小技巧分享

《将Python应用部署到生产环境的小技巧分享》文章主要讲述了在将Python应用程序部署到生产环境之前,需要进行的准备工作和最佳实践,包括心态调整、代码审查、测试覆盖率提升、配置文件优化、日志记录完... 目录部署前夜:从开发到生产的心理准备与检查清单环境搭建:打造稳固的应用运行平台自动化流水线:让部署像

gradle安装和环境配置全过程

《gradle安装和环境配置全过程》本文介绍了如何安装和配置Gradle环境,包括下载Gradle、配置环境变量、测试Gradle以及在IntelliJIDEA中配置Gradle... 目录gradle安装和环境配置1 下载GRADLE2 环境变量配置3 测试gradle4 设置gradle初始化文件5 i

Mycat搭建分库分表方式

《Mycat搭建分库分表方式》文章介绍了如何使用分库分表架构来解决单表数据量过大带来的性能和存储容量限制的问题,通过在一对主从复制节点上配置数据源,并使用分片算法将数据分配到不同的数据库表中,可以有效... 目录分库分表解决的问题分库分表架构添加数据验证结果 总结分库分表解决的问题单表数据量过大带来的性能