Skip to content

Allow passing commands to compiler instead of enforcing an executable #3252

@Alvaro-Kothe

Description

@Alvaro-Kothe

Is your feature request related to a problem? Please describe it.
Currently, VimTeX's compiler configuration expects the executable field to be a single executable name or path. This prevents users from running compilers through containerized environments, such as toolbox run -c texbox latexmk.

Describe the solution you'd like
I want to have an option in g:vimtex_compiler_latexmk to pass a command (or don't fail when passing a command to executable):

let g:vimtex_compiler_latexmk = {
    \ 'executable' : 'toolbox run -c texbox latexmk', " this currently fails when trying to compile
    \ 'executable' : ['toolbox', 'run', '-c', 'texbox', 'latexmk'], " maybe permit when it's a list 
    \ 'command': 'toolbox run -c texbox latexmk' " another alternative
}

Describe alternatives you've considered
I currently am using options like this:

      vim.g.vimtex_compiler_latexmk = {
        ["executable"] = "toolbox",
        ["options"] = {
          "run",
          "-c",
          "texbox",
          "latexmk",
          "-verbose",
          "-file-line-error",
          "-synctex=1",
          "-interaction=nonstopmode",
        },
      }

Other discussed options are using compiler_generic (vide #1898) and creating a wrapper (vide #3190 (comment))

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions