Questions tagged [filetype-tex]

Questions about editing Tex documents, either with or without a frontend such a LaTeX.

Filter by
Sorted by
Tagged with
1
vote
2answers
75 views

Erratic spell checking

I was editing the resume in latex I had downloaded from here. Vim is most erratic when it comes to checking spelling. In the resume_cv.tex file, the spell checking works. When I open any of the ...
1
vote
1answer
46 views

Create ,SI command to pack numbers and unit into \SI{…}{…}

I have a lot of older LaTeX files about physics, which contain values like 9.81 m/s^2. Since I'm now using siunitx and it's very useful \SI command, I have to change this to \SI{9.81}{m/s^2}. There ...
1
vote
1answer
1k views

Map single key to compile and open LaTeX PDF [duplicate]

I use VIM for writing in LaTeX and I would like to have a single key to compile the text and open a PDF of it. I have the line map <F10> :!pdflatex % && start %.pdf in my vimrc. It ...
1
vote
1answer
14 views

Unable to select templates with vim-latex

I have Vim on Ubuntu 18.04 and I have sucessfully installed the vim-latex package. When I open a .tex file, vim regognizes it as latex and the plugin kicks in (I have already struggled with this a few ...
1
vote
1answer
36 views

Vim-latex not starting automatically for .tex files

I have Vim on Ubuntu 18.04 and I am trying to use the vim-latex package. By typing :set rtp? on Vim I get the following output: runtimepath=~/.vim,~/.vim/pack/bundle/start/vim-latex-1.10.0,/var/lib/...
1
vote
1answer
42 views

How to autocomplete citations in markdown files

I take notes in markdown files which I sometimes convert to other documents with pandoc. With the --bibliography=bibliography.bib argument, pandoc recognizes the @key citation format in markdown and ...
1
vote
1answer
23 views

Opening and compiling tex files in subdirectory

I am using Linux mint cinnamon. Let's say I have .tex file in the sub-directory ~/MyTexfiles/Integration. When I double click on the .tex file to open it, it opens in vim since vim is my default ...
1
vote
1answer
29 views

Command to open pdf file when editing a latex document

I have this command to open the pdf created by a latex document: autocmd FileType tex nnoremap <leader>p :silent !open $(echo "%:p" \| sed s/.tex/.pdf/g)<CR> which works, but I'd like to ...
1
vote
1answer
31 views

Latex-Suite in Vim exits out of tex document if there's a warning in the aux file on compilation

I recently installed Latex-Suite using Vundle, and I use Latex to take notes. My notes are separate files for each lecture, but I have a master.tex file set up to compile each document together, and I ...
1
vote
1answer
95 views

Multiline errorformat

I would like to parse the latex log to extract warnings from the refcheck package. These warnings look like this Package refcheck Warning: Unused label `eq:my_equation_label' on input line 2 28. The ...
1
vote
0answers
24 views

TeX syntax file not recognising bold-italic blocks

Basically title. Text inside \textit and \textbf is correctly formatted in italics and bold, but if I nest one inside the other, the text takes the formatting of the outer command, as shown here the ...
1
vote
0answers
12 views

Doxygen LaTeX syntax

I am using doxygen to document my code and I like to have additional markdown files which include formulas by using \f$ Formula \f$. I know markdown syntax provided by the vim-markdown plugin supports ...
1
vote
0answers
29 views

Conceal with the highlighting of matching begin/end latex environment

I want to use vim conceal feature with the highlighting of matching begin/end latex environment (vimtex plugin). When I use the following code syn match texStatement '\\begin{itemize}' contained ...
1
vote
1answer
89 views

How to use TexMathZones in Markdown Syntax, for Snippets?

I am a recent and very happy Vim User. I write Mathematics and Computer Science Lecture Notes in Markdown Files, organized in a Vimwiki. I use the UltiSnips Snippet Plugin. This plugin provides me ...
1
vote
0answers
21 views

Autoindentation in .tex files

I use Vim to write Latex code and I would like to have autoindent when adding environments. I am aware of the smartindent capabilities that can be toggle on and off by inspecting the $VIMRUNTIME/...
1
vote
0answers
15 views

TeX file, search outside math

Well, the question is clear. I want to search only on text that is not inside \[ \] or $ $ . Is there some readymade code to do so? Thanks.
1
vote
1answer
236 views

Latex-suite <alt-I> mapping

Last week I reinstalled Ubuntu 18.04 LTS on my laptop. During my last installation of ubuntu (also 18.04) I learned vim and used it in combination with the latex-suite. However on this new ...
1
vote
0answers
77 views

Ignore acronyms as spelling errors in TeX files

My LaTeX files contain lots of acronyms and they are often highlighted as spelling errors. I tried to ignore acronyms by adding syn match AcronymNoSpell '\<\(\u\|\d\)\{3,}s\?\>' contains=@...
1
vote
0answers
63 views

How to stop vim from automatically displaying latex formatting? [duplicate]

I have a latex file I am editing in vim. Something annoying that I'm running into is that vim seems to auto display things that I am typesetting in math mode. Here is an example. Say I write the ...
1
vote
0answers
36 views

custom syntax hilighting lost on single LaTeX file

I use vimtex plugin for writing tex documents in vim8. I added custom hilight for sections in my .vimrc like so: autocmd FileType tex :syntax match texSectioning "\\section.*" The texSectioning is ...
1
vote
0answers
397 views

How to map <C-Space> to ESC

I am using nnoremap <C-Space> i inoremap <C-Space> <Esc> to map to Esc. It works for all file with any extension but it doesn't work for the files with ".tex" extension ( I am ...
1
vote
0answers
99 views

macvim does not recognize math latex symbols anymore

I am running Macvim 8.0.1633 (146) on macos 10.13.3 Weirdly, even with syntax on, the math highlighting is plain wrong: Here, I didn't search for end{equation} Does anyone know what is going on?
1
vote
0answers
27 views

Do not wrap certain environments [duplicate]

I am using neovim. When editing a .tex file I don't want to wrap the lines within certain environments like equation or align and some others. \begin{equation} % very long line I don't want to ...
1
vote
0answers
261 views

vim - latex suite compile and view keys does not work

I'm trying to setup vim-LaTeX on a new pc and I'm having problems with compile and view. ( \ll and \lv commands). When I push \ll I get the following error; Error detected while processing function ...
1
vote
1answer
27 views

Fields in templates without resorting to commented-out lists (aka are drop-down options possible?)

I do a lot of work in plain TeX and XeTeX, editing the documents in vim, and have a variety of templates which I use to make the process more efficient. As you might expect, these use quite a lot of ...
1
vote
0answers
65 views

vim-latexsuite syntax highlight in macro parameter

I'm using vim with vim-latex to edit my LaTeX-files. I noticed that the \begin{env} and \end{env} are not colorized when they are in a macro parameter (the \vary command and question environment are ...
1
vote
0answers
355 views

Conceal not working with tex files and vim-plug

Normally, :syn match Entity "e" conceal and :set conceallevel=3 results in all es being concealed. But, if I use vim-plug, this does not work in a tex-file …
1
vote
0answers
296 views

Problem using LaTex .bib file with UltiSnips completion

Environment Ubuntu 14.04 Vim 7 Tmux I'm just trying to create some snippets for UltiSnips and writing bib files. What I want To create custom snippets that will make writing bib files (that I can'...
0
votes
1answer
44 views

How to set a command as a file type specific autocommand

I would like the :Toc command to call :Voom in R markdown files and :VimtexTocOpen in latex files. First try: au BufRead,BufNewFile *.Rmd command! Toc Voom au BufRead,BufNewFile *.tex command! Toc ...
0
votes
1answer
32 views

Indentation is slow in vimtex

If you try to indent a moderate size .tex file (~ 3,000 words/500 lines) using the normal mode command gg=G, vimtex seems to take some time. However LaTeX-Box seems to indent faster. I didn't ...
0
votes
1answer
55 views

Make conditional imap to text being enclosed in certain characters

How can I create mappings that work only if the cursor is enclosed by certain characters? As an example, I want to map ja to \alpha if the cursor is enclosed by $$ or by \[\] so as to make This jar ...
0
votes
1answer
34 views

How to map a call to a system function using the current filename?

I've been using vim for a little while and I'm doing some LaTeX with it, using Tectonic as the engine. What I was doing to generate the pdf (without leaving the editor) :call system("tectonic main....
0
votes
1answer
62 views

How to discover available keybindings for Vim's vanilla TeX mode?

I'd like to use Vim (version 7.4) to edit TeX files using the built-in, vanilla TeX mode. How do I find out about any available keybindings that are special for this mode? Does not seem to be listed ...
0
votes
1answer
26 views

Toggle between displaymath and inline math modes in LaTeX

I'm trying to come up with a way of doing the following in vim. When editing LaTeX documents, I need on a fairly regular basis to toggle between display and inline math modes. Let me explain: suppose ...
0
votes
1answer
32 views

How to prevent duplicated sections in taglist with vim-latex

The plugin yegappan/taglist and the plugin vim-latex are very nice to navigate within the table of content of a latex document. There is an issue however on my system section titles are duplicated. ...
0
votes
1answer
441 views

How to show all LaTeX code but still have set conceallevel=3 for vim-devicons and NERDTree?

How can I adjust my .vimrc so that set conceallevel=0 is specific to just LaTeX documents? The plugin vim-devicons requires the following conceal level with NERDTree: set conceallevel=3 However, ...
0
votes
1answer
94 views

Run pdflatex in vim without a pop-up window

I currently have this autocommand in my vimrc: autocmd BufWritePost *.tex silent! execute "!pdflatex %" | redraw! It compiles my current LaTeX file whenever I save with :w. However, a terminal ...
0
votes
1answer
152 views

Stop vim-latex from autocompiling on save

I'm not sure if it has always happened or its just recent, but vim auto-compiles on each save (:w). I would like to only manually compile (I use a hot-keyed pdflatex command instead). I've had a ...
0
votes
1answer
56 views

LaTeX indent for \iff error in vim

With the minimal vimrc (with vimtex plugin): set nocp filetype plugin indent on syntax on set st=2 set acd set wildmenu set wildmode=longest,list,full let $USRPLUGD=$HOME.'\vimfiles\myvim\plugged' ...
0
votes
1answer
74 views

fnameescape() : add other characters to be escaped (parenthesis, commas etc)

I looked around for a long time but did not find any solution for that. On my Unix system (Ubuntu), using LaTeX-suite, I need to escape some characters in file names for compilation, say parenthesis (,...
0
votes
1answer
109 views

Read the first line of the current file to process it in a command (Emulating %TeX root)

Currently I have the line :nnoremap <leader>c :w<CR>:!arara %<CR><CR> in my $MYVIMRC. If I press <leader>c, it will save the current file and run the command arara on ...
0
votes
1answer
308 views

vim latex livereload/preview plugin

Can you please suggest any latex plugin with livereload/preview support ? All of the plugins google suggested me does not support preview/reload, or use 3rd party tools that use another 3rd party ...
0
votes
1answer
55 views

Allow comment highlighting inside biblatex entries

The default syntax highlighting for bib files doesn't highlight comments inside entries, like this: @book{test, % title = {This isn't highlighted as a comment}, } That's because bibtex doesn't ...
0
votes
0answers
15 views

Conceal works but not on some nested regions

I'm trying to conceal the LaTeX command \footnote{} in a .tex file and show a bullet point instead. This works mostly fine, but when there is a \cite{} command inside the footnote, everything but the ...
0
votes
0answers
16 views

Wrap specific lines in buffer

is it possible to set nowrap to a line range in the active buffer and set wrap to everything else? I edit LaTeX files. I want to see everything after \begin{document}. but only see the general ...
0
votes
0answers
414 views

UltiSnips: snippets not expanding

This is a noob question. I just installed UltiSnip to make use of the TeX snippets. Here is the relevant part of my init.vim: " Specify a directory for plugins (powered by vim-plug) call plug#begin('~...
0
votes
1answer
91 views

inoremap inserts unwanted tabs

I recently made myself custom insert mode keybindings to type faster in LaTeX. However, When I use them, Vim adds tabs that weren't part of the original keybinding. Example: Here is my inoremap: ...

1 2
3