Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to replace deprecated option 'vimtex_view_general_options_latexmk'? #2887

Closed
ChristophSchmidpeter opened this issue Feb 23, 2024 · 4 comments
Labels

Comments

@ChristophSchmidpeter
Copy link

ChristophSchmidpeter commented Feb 23, 2024

Description

I have the following lazy.nvim vimtex Lua config file:

return
{
  {
    "lervag/vimtex",
    config = function ()
        vim.g.vimtex_view_general_viewer = 'okular'
        vim.g.vimtex_compiler_latexmk_engines = {
            _ = '-xelatex'
        }
        vim.g.tex_comment_nospell = 1
        vim.g.vimtex_compiler_progname = 'nvr'
        vim.g.vimtex_view_general_options = [[--unique file:@pdf\#src:@line@tex]]
        vim.g.vimtex_view_general_options_latexmk = '--unique'
    end,
    ft = 'tex'
  }
}

With it upon opening .tex files I get the following error on startup:

VimTeX: Deprecated option(s) detected!
        - g:vimtex_view_general_options_latexmk
        Please see `:help OPTION` for more info!

With what/How do I replace the deprecated option vimtex_view_general_options_latexmk?
In the :help file I only found the option vimtex-compiler-latexmk, but I guess this option does something else?

Steps to reproduce

See above

Expected behavior

No error message

Actual behavior

Error message

Do you use a latexmkrc file?

No, I believe?

VimtexInfo

System info:
  OS: Linux 6.6.10-zen1-1-zen
  Vim version: NVIM v0.9.5
  Has clientserver: true
  Servername: /run/user/1000/nvim.100599.0

VimTeX project: main
  base: main.tex
  root: /home/vbm/Projects/Bewerbung/Cv/cv
  tex: /home/vbm/Projects/Bewerbung/Cv/cv/main.tex
  main parser: texroot specifier
  document class: article
  packages: amsbsy amsgen amsmath amsopn amstext array atbegshi atbegshi-ltx atveryend atveryend-ltx auxhook babel biblatex bigintcalc bitset blx-case-expl3 csquotes easyCV etexcmds etoolbox expl3 fix-cm fontenc fontspec fontspec-xetex geometry gettitlestring graphics graphicx hycolor hyperref ifluatex iftex ifthen ifvtex ifxetex infwarerr intcalc keyval kvdefinekeys kvoptions kvsetkeys l3keys2e letltxmacro logreq ltxcmds microtype nameref parskip pdfescape pdftexcmds pgf pgfcomp-version-0-65 pgfcomp-version-1-18 pgfcore pgffor pgfkeys pgfmath pgfrcs pgfsys refcount rerunfilecheck sourcesanspro stringenc switchlang tabularx textpos tikz trig unicode-math unicode-math-xetex uniquecounter url xcolor xkeyval xparse
  compiler: latexmk
    engine: -xelatex
    options:
      -verbose
      -file-line-error
      -synctex=1
      -interaction=nonstopmode
    callback: 1
    continuous: 1
    executable: latexmk
  viewer: General
  qf method: LaTeX logfile
@ChristophSchmidpeter ChristophSchmidpeter changed the title How to replace deprecated option 'vimtex_view_general_options_latexmk' How to replace deprecated option 'vimtex_view_general_options_latexmk'? Feb 23, 2024
@lervag
Copy link
Owner

lervag commented Feb 23, 2024

I have the following lazy.nvim vimtex Lua config file: …

You want this:

return
{
  {
    "lervag/vimtex",
    init = function()
      vim.g.vimtex_compiler_latexmk_engines = { _ = "-xelatex" }
      vim.g.vimtex_view_general_viewer = "okular"
      vim.g.vimtex_view_general_options = "--unique file:@pdf\\#src:@line@tex"
    end,
  }
}

I belive this should fix your problems.

Notice: DON'T lazy load VimTeX (remove ft = tex).

@lervag lervag closed this as completed Feb 23, 2024
@lervag
Copy link
Owner

lervag commented Feb 23, 2024

Also vim.g.tex_comment_nospell = 1 is not relevant to VimTeX.

@ChristophSchmidpeter
Copy link
Author

@lervag Thanks very much for your help!

@lervag
Copy link
Owner

lervag commented Feb 23, 2024

Glad to help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants