Questions tagged [filetype-tex]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
18 views

Ignore spell check for LaTeX commands with multiple arguments

I have read through a lot of the posts on spell checking LaTeX syntax - here, here, and here. I am sure the problem is my lack of regex understanding, but I am having trouble configuring it so that ...
0
votes
1answer
30 views

Shell script runs multiple times, I want it to run only once

I use vim pretty extensively for latex compiling. I've a function which automatically compiles the current tex file. I use pdflatex as a compiler, which creates a bunch of different files that it ...
3
votes
1answer
45 views

LaTeX: turn off text wrap and auto indent in maths environments

I use vim with vim-latex for editing latex files. I always have hard wrapping enabled using set tw=80. I also have the default vim-latex auto indent settings enabled. I wonder if there is a way to ...
0
votes
1answer
32 views

vim/vim-latex: spell-check highlighting breaks after occurrences of \end{center}, \end{enumerate}, \end{itemize}

The highlighting of misspelled words in my LaTeX documents breaks, when I open a .tex file and jump to the bottom instead of scrolling through the whole document. Only .tex files seem to be affected, ...
1
vote
1answer
28 views

Wrapping text in environment vimtex

I use vimtex although I am by no means an expert in Vim, so it may be that I'm missing something obvious. Anyway, I am looking for functionality similar to that of 'cse, csc, csd' (which change the ...
1
vote
0answers
32 views

:PlugUpdate is required every time I open vim [closed]

I’m setting up my LaTeX environment for vim, but the snippets (Ultisnips + vim-snippets + Gilles Castel’s tex.snippets with some changes) only work after I run :PlugUpdate (using vim-plug). I have to ...
4
votes
1answer
80 views

LaTeX dollar signs confuse syntax highlighting

I am editing LaTeX code such as: \documentclass{article} \usepackage{booktabs,tabularx} \begin{document} Blah blah Blah blah \begin{table}\centering \begin{tabular}{>{$}l<{$}p{4in}} %...
0
votes
1answer
110 views

Setting conceallevel in .vimrc does not work in .tex file

I've set conceallevel=0 in .vimrc, but the text is not shown normally after opening .tex file. I have to type it again while the file is open and it works. From my .vimrc: "vimtex config set ...
0
votes
0answers
23 views

snippets visual is not selected when there is overfull warning

Disclmair: this is a question about using vim to write LaTeX. I don't know if this behaviour is visible in other languages also. I use Ultisnips with honza/vim-snippets to expand latex snippets. If ...
1
vote
1answer
43 views

Running pdflatex using a key mapping

I have a latex file which includes multiple figures. These figures are kept in different directories whose path is given in the latex file using the graphicx package: \usepackage{graphicx} \...
0
votes
0answers
28 views

Personalizing Vim-Latex reference \ref completion

Vim-Latex is a very big plugin, but the only reason why I use it is that it can complete references \ref{.. and citations \cite{.. I recently created my own latex equation environment, which usually ...
0
votes
0answers
72 views

I would like to set the math direct display mode in vim as seen in Sublime Text 3

When I write mathematical formulas of any kind, the vim editor displays them and transforms them into a more readable format, see here: https://github.com/KeitaNakamura/tex-conceal.vim (the images ...
1
vote
1answer
136 views

Is it possible to setup vim to use vimtex for Rmd files?

I need to write Rmd files, but I can't imagine life without vimtex. Is there a way that I can use vimtex with Rmd files? Ideally, I would also like to keep the syntax highlighting that I have for Rmd ...
2
votes
0answers
63 views

Can Ultisnips regular expression match forward?

The question may be also phrased as, can Ultisnips regular expression match after the current cursor? My goal is to have a postfix of curly bracket for LaTeX subscripts. Say I want to type a_{bcd}, ...
0
votes
1answer
29 views

Plain Text for LaTeX, No Rich Text Features [duplicate]

Look at Line 37 and Line 45, Line 45 has been folded so that $...$ does not show. But I do not want this feature. Is there any way to stop it? (I have not installed vimtex) Also I do not want the rich ...
1
vote
1answer
40 views

Enhance Latex Syntax without Rewriting everything

I want to extend the latex syntax for the given file: \documentclass[a4paper,11pt]{book} \begin{document} \begin{figure}[t] \begin{tikzpicture} \node[alter] at (0,0) (v1) {typ0}; ...
1
vote
1answer
34 views

Syntax Highlight Problem for Latex/Tikz

I have a tikzpicture inside a latex file. My problem is that when I open the file and jump with GG to the end of the file, the math environment inside the tikz-nodes is not highlighted (e.g. $v_0^1$)....
0
votes
0answers
20 views

Automaticall close LaTeX begin environment with end [duplicate]

I want to automate some routine operations when working with LaTeX documents writing, e.g. I often write these lines: \begin{<environment-name>} some text and commands here \end{<environment-...
2
votes
0answers
198 views

How to control and filter warnings in vim-latex?

While vim-latex is great, I've been having a bit of trouble using some of its features. Controlling the warning system (and hotfix window) has been particularly difficult for me. Today I'm trying to ...
0
votes
1answer
29 views

Display the same color for all characters in a math section

In a tex file, almost all the characters inside delimiters like $...$ or \[...\] have the same color, but there are some characters, like = (and possibly others) which have a different color. I would ...
1
vote
1answer
42 views

How to switch the order in which objects appear

I have a custom command in a TeX file which takes two inputs A and B, let's call it \operation{A}{B}. I want to find all of the instances of \operation where the first entry A starts with the string ...
0
votes
0answers
214 views

Open pdf command in Nvim

I use Nvim to write my LateX documents. In my init.vim file I have defined a command to compile my .tex file like this: command CompileXelatex !xelatex -halt-on-error % I tried to do the same to view ...
1
vote
1answer
235 views

UltiSnips regex macthing

I want the possibility of transforming an inline equation in latex to a display equation. So I want $something$ to become $$ something $$ My attempt was this: snippet "$(.+)$" "...
0
votes
2answers
55 views

conceal function not working in tmux

Version: vim 8.1 Problem: Latex objects like \int, ^, \alpha, \beta, etc, all get replaced by _ in tmux when using conceallevel=1,2. Expected: correct concealment, as it happens in normal terminal, ...
1
vote
0answers
33 views

Unwanted characters appear in an UltiSnips macro setup

I am new to vim and I am using a mac with vimtex, UltiSnips plugins. I am using the vim latex snippets found here (the tex.snippets file). Whenever I type "()", "{}", the text ...
1
vote
1answer
84 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 ...
2
votes
0answers
81 views

Minimum window width will not change when using specific filetype

With most filetypes, I can resize font and my GVIM application window just fine. However, when I open a specific file type (.tex), the font is easily changed, but I am unable to shrink the application ...
2
votes
2answers
93 views

Where do filetype-specific autocommands live?

I have a plugin for a specific filetype (*.tex), and I'm wondering where I can find all the commands which are executed when I type :e examplefile.tex? In general, is there a standardized practice for ...
3
votes
0answers
37 views

More intelligent automatic formatting

I use vim to edit latex files and the automatic formatting option (formatoptions+=a) works very well, since you can enter text anywhere in the paragraph and vim will reformat the entire paragraph. The ...
1
vote
1answer
238 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/...
3
votes
0answers
57 views

How does expression folding actually work?

The following is a stripped down version of my folding function for LaTeX documents: setlocal foldmethod=expr setlocal foldexpr=LaTeXFoldsExpr(v:lnum) " Sections to be folded let g:...
1
vote
2answers
172 views

Check if :make fails

I just setup this mapping for my latex development: nnoremap <buffer> <LocalLeader>o :make %:r.pdf <Bar> !open %:r.pdf<CR><CR><CR> But I wondered about checking if ...
1
vote
0answers
41 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 ...
0
votes
1answer
40 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 ...
1
vote
0answers
15 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 ...
3
votes
1answer
476 views

TeX/LaTeX vim fold markers options

In complex files, especially when writing packages with basic TeX-LaTeX code, the standard definition of foldmarker, namely {{{,}}}, is unfortunate — in effect is quite common to have pieces of code ...
2
votes
1answer
513 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 ...
0
votes
1answer
365 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 ...
1
vote
0answers
88 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
98 views

How to change make command

In my ~/.config/nvim/ftplugin/tex.vim I have the following: set makeprg=pdflatex\ -halt-on-error\ -file-line-error\ -synctex=1\ % set errorformat=%f:%l:\ %m however when I run make the command that ...
2
votes
1answer
31 views

How to edit a macro for F5 in Latex Suite

I have an environment for Theorem (aliased to "thm") When in VIM editor I write "thm" followed by "F5" I get: \begin{thm} \end{thm}<++> Can I edit the macro so that I get instead: \begin{...
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 ...
3
votes
1answer
92 views

Disabling `kana/vim-textobj-entire` by filetype autocommand

kana/vim-textobj-entire creates text-obejcts ae and ie which stand for the entire buffer. But in lervag/vimtex ae and ie stand for an environment in a .tex file. vimtex's ae and ie mappings are much ...
1
vote
1answer
87 views

Silence command but not its output

I use the following function to compile a LaTeX document function! TeXCompile() let filepath = expand('%:p') execute "!cd $(dirname ".shellescape(filepath,1).") && pdflatex -synctex=1 "....
0
votes
1answer
39 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
104 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 ...
2
votes
0answers
45 views

Concealing \begin and \end lines in latex with MathZone

I'm trying to get the lines that have \begin{equation} and \end{equation} to be concealed. I've tried using call matchadd('Conceal','\\begin{equation\*}', 10,13,{'conceal':' '}) and it works, but it ...
1
vote
1answer
38 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
83 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
50 views

Empty space between two &

I want to empty inner columns in a latex table, ie all the words between 2 &. How I can do it ? I have tried quite a few formulas like s/&*&/\& \&/gc but I just can't find ...