Comments (2)
I am sorry, my pdf file was missing the vimtex-tex-program
directive at the top, adding the following to the top of my pdf file worked:
% !TeX program = xelatex
...
from vimtex.
I am using the following configuration for
vimtex
plugin to usexelatex
:vim.g.vimtex_compiler_latexmk = { executable = 'latexmk', options = { '-xelatex', -- Specifies the use of XeLaTeX '-file-line-error', '-synctex=1', '-interaction=nonstopmode', }, }
That's NOT the right way to configure VimTeX to use xelatex
. I understand that this is not obvious, but it is explained in the docs:
-
:help g:vimtex_compiler_latexmk
- see the "Note!" for theoptions
key:options ~ This is a list of options that are passed to `latexmk`. The default options should work well for most people. Note: Options like `-pdf` or `-lualatex` should NOT be added to this list. These are options used to specify the LaTeX processor/engine, see instead |g:vimtex_compiler_latexmk_engines|.
-
:help vimtex-tex-program
And my overall configuration looks like following: …
- Unless you are loading your plugins manually, instead of using a plugin manager, you don't need to do the
filetype plugin indent on
andsyntax enable
, so you can most likely remove those lines. - You don't need to change
g:vimtex_compiler_latexmk
(the only change you are doing is not a valid change). - Notice that
maplocalleader
is not specific to VimTeX - it may impact other plugins as well.
When I start the live compilation (using
,,
in command mode)
Did you mean ,ll
?
If I set the default compiler as follows:
vim.g.vimtex_compiler_latexmk_engines = { _ = '-xelatex', xelatex = '-xelatex', lualatex = '-lualatex', }
I am able to use the
xelatex
. What am I doing wrong?
Well, the latter approach is what you are supposed to do. Notice, though, that you don't need to include keys you are not changing, so you can simplify it to:
vim.g.vimtex_compiler_latexmk_engines = { _ = '-xelatex' }
I am sorry, my pdf file was missing the
vimtex-tex-program
directive at the top, adding the following to the top of my pdf file worked:% !TeX program = xelatex
Notice that this is a different approach for changing the compiler engine. I personally prefer using this approach, because it is also recognized by other editors. So, as a sensible solution, I think you should simplify your config to something like the following and then use the tex program directive for specifying the engine:
vim.g.vimtex_view_method = 'skim'
vim.g.vimtex_view_skim_sync = 1
vim.g.vimtex_view_skim_activate = 1
-- NB! I would move this to wherever you are specifying your general neovim
-- options. Just make sure it is defined before you load plugins.
-- See :help maplocalleader for more info.
vim.g.maplocalleader = ','
from vimtex.
Related Issues (20)
- Poor error output in bibliography issue HOT 3
- Autocompletion using '\' instead of '/' in paths (Windows 10) HOT 7
- Cannot call zathura from vimtex HOT 4
- vimtex doesn't seem to recognise latexmkrc requesting lualatex HOT 4
- An option to deal with dot when toggling inline and displaymath with `ts$` HOT 1
- Real-time scrolling output of latexmk (or compiler) HOT 4
- Highlight illegal characters HOT 10
- Implement a .lua configuration HOT 3
- how do I unmap just some mappings? HOT 4
- Inconsistent syntax highlighting in subscript and superscript HOT 1
- Help Add custom concealing rule for VimTeX on neovim HOT 3
- How do I get rid of a "latexmk is not executable" error? HOT 4
- supertab completion takes 20 seconds to complete a word when using many latex packages HOT 5
- Inverse search does not work with sioyek HOT 8
- Magic comment for compiler fails if there are trailing spaces HOT 3
- Vimtex doesnt boot HOT 25
- package 'unicode-math' yields compile error HOT 3
- [SOLVED] Focus the terminal when doing inverse search HOT 3
- viewer shouldn't open automatically when compilation finished HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vimtex.